[Catalyst] Setting file handle as the response body generates
warnings.
neil.lunn
neil at mylunn.id.au
Thu Nov 21 02:14:01 GMT 2013
On 21/11/2013 1:04 PM, neil.lunn wrote:
> 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'
Oh, and a test case outside of catalyst, noting the -s operator fail:
echo "1234567890ABCDEFG" | gzip -c >x.gz
#!/usr/bin/env perl
use Modern::Perl;
use File::Slurp;
use IO::Uncompress::Gunzip;
use Data::Dumper;
my $z =3D read_file "x.gz";
my $fh =3D IO::Uncompress::Gunzip->new( \$z );
my $size =3D -s $fh;
print Dumper( $fh->getHeaderInfo );
print "Size: ", $fh->getHeaderInfo->{ISIZE}, "\n";
print $fh->getline();
$fh->close();
-s on unopened filehandle GEN0 at test.pl line 11.
$VAR1 =3D {
'NameFlag' =3D> 0,
'TrailerLength' =3D> 8,
'Header' =3D> '??R',
'CRC32' =3D> 3714309751,
'ISIZE' =3D> 18,
'ExtraFlag' =3D> 0,
'Flags' =3D> 0,
'Comment' =3D> undef,
'isMinimalHeader' =3D> 0,
'ExtraField' =3D> [],
'HeaderLength' =3D> 10,
'OsID' =3D> 3,
'MethodID' =3D> 8,
'MethodName' =3D> 'Deflated',
'HeaderCRC' =3D> undef,
'TextFlag' =3D> 0,
'Name' =3D> undef,
'CommentFlag' =3D> 0,
'HeaderCRCFlag' =3D> 0,
'Type' =3D> 'rfc1952',
'FingerprintLength' =3D> 2,
'Time' =3D> 1384950479,
'ExtraFlags' =3D> 0,
'ExtraFieldRaw' =3D> undef,
'OsName' =3D> 'Unix'
};
Size: 18
1234567890ABCDEFG
>> $VAR1 =3D {
>> 'Time' =3D> 1383843952,
>> 'Flags' =3D> 8,
>> 'TextFlag' =3D> 0,
>> 'MethodID' =3D> 8,
>> 'ExtraField' =3D> [],
>> 'CommentFlag' =3D> 0,
>> 'Type' =3D> 'rfc1952',
>> 'NameFlag' =3D> 1,
>> 'ExtraFlags' =3D> 2,
>> 'HeaderCRC' =3D> undef,
>> 'isMinimalHeader' =3D> 0,
>> 'MethodName' =3D> 'Deflated',
>> 'ExtraFlag' =3D> 0,
>> 'HeaderLength' =3D> 39,
>> 'ExtraFieldRaw' =3D> undef,
>> 'Comment' =3D> undef,
>> 'OsName' =3D> 'Unix',
>> 'FingerprintLength' =3D> 2,
>> 'HeaderCRCFlag' =3D> 0,
>> 'OsID' =3D> 3,
>> 'TrailerLength' =3D> 8,
>> 'Name' =3D> 'Catalyst-Runtime-5.90051.tar',
>> 'Header' =3D> p?{RCatalyst-Runtime-5.90051.tar'
>> };
>>
>>
>> -- =
>> Bill Moseley
>> moseley at hank.org <mailto:moseley at hank.org>
>>
>>
>> _______________________________________________
>> 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=
k/
>> Dev site:http://dev.catalyst.perl.org/
>
>
>
> ------------------------------------------------------------------------
> <http://www.avast.com/> =
>
> This email is free from viruses and malware because avast! Antivirus =
> <http://www.avast.com/> protection is active.
>
>
>
>
> _______________________________________________
> 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=
k/
> Dev site: http://dev.catalyst.perl.org/
---
This email is free from viruses and malware because avast! Antivirus protec=
tion is active.
http://www.avast.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20131121/b515b=
b74/attachment.htm
More information about the Catalyst
mailing list