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

neil.lunn neil at mylunn.id.au
Thu Nov 21 07:32:45 GMT 2013

On 21/11/2013 11:48 AM, Bill Moseley wrote:
>>> $ perl -MIO::Uncompress::Gunzip -le 'use Data::Dumper; print Dumper =

>>> +IO::Uncompress::Gunzip->new( "Catalyst-Runtime-5.90051.tar.gz" =

>>> )->getHeaderInfo'

Actually with more reading on this getting the uncompressed size =

reliably can be a real pain, and thus is not in the getHeaderInfo over =

certain size lmits.

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 );

> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.u=
> Dev site: http://dev.catalyst.perl.org/

This email is free from viruses and malware because avast! Antivirus protec=
tion is active.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20131121/46bb9=

More information about the Catalyst mailing list