[Catalyst] Setting file handle as the response body generates warnings.

Bill Moseley moseley at hank.org
Thu Nov 21 13:33:58 GMT 2013

On Wed, Nov 20, 2013 at 11:32 PM, neil.lunn <neil at mylunn.id.au> wrote:

> This approach may work for you is the compressed data is actually in a
> scalar and not too large. And not too small. YMMV.
> my $z =3D read_file "product.json.gz";
> my $io =3D IO::Scalar->new( \$z );
> $io->seek( -4, 2 );
> $io->read( my $buf, 4);
> my $uncompressed_size =3D unpack( 'V', $buf );

This indeed does work in my tests.   Thanks for all the help, Neil.   I
really appreciate the time you spent on this.

-- =

Bill Moseley
moseley at hank.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20131121/72da3=

More information about the Catalyst mailing list