> In your mp1 code, you are simply slurping the upload into
> $full_image_data; with apreq2 you can do that with a bucket
> brigade via
>
> my $bb = $req->upload('image')->bb;
> my $full_image_data = "";
>
> while (my $b = $bb->first) {
> $b->read(my $buffer);
> $full_image_data .= $buffer;
> $b->remove;
> }
>
> I'm sure there are better ways to use the brigade API
> though.
that's pretty much the only way I've seen it used, but stas might have other
examples up his sleeve.
I did think that $b->remove() was still problematic though
> The C API for brigades has a "flatten" function-
> does anyone know if mp2 has glue for that yet?
apr_brigade_flatten and apr_brigade_pflatten are currently not open, though
they are marked as "unclassified" which I take to mean that doug never
decided whether to make them available or not.
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?
--Geoff
--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html