Joe Schaefer wrote:
Geoffrey Young <[EMAIL PROTECTED]> writes:

[...]


I'm not as familiar with brigades as I should be, but does
it save you the iteration process or is it just a substitute for
reading to a buffer?


It'd save you the iteration process (it's an APR::Brigade method,
not APR::Bucket), but would not destroy the buckets within the brigade (hmm, does APR::Brigade have a DESTROY method?).


The advantage here is you'd be able to accomplish this
in one or two lines of perl, ie.

my $upload_data = $req->upload('file')->bb->flatten;

It doesn't sound like a good idea. Users ain't need to mess with bucket brigades, unless they really want to. If the upload is always going through the temp file, why making things complex for the users?


In any case it's the best to hide the internals behind an API, so you can do:

my $upload_data = $req->upload('file')->slurp;

and inside slurp you have the C API to do anything you need. How does that sound?



__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


-- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html



Reply via email to