develooper Front page | perl.par | Postings from October 2006

bugs somewhere, not sure where: Perl? PAR? Image::Info::JPEG? All3?

Thread Next
Glenn Linderman
October 24, 2006 14:05
bugs somewhere, not sure where: Perl? PAR? Image::Info::JPEG? All3?
Message ID: script as follows, has been reduced from a larger program in 
which Image::Info::JPEG fails when included in a PAR pp packed 
executable program.  Let me know if any of these issues should be raised 
in a different forum.

#!perl -w
use strict;
use warnings;

my $data = "zyabcdefghijklmnopqrstwxyz";
my ( $fh, $buf );

open ( $fh, "<", \$data )  or  die "can't open string fh: $!";

my $ret = read( $fh, $buf, 4 );
print "ret=$ret  buf=$buf\n";

As is, it works as I would expect:

ret=4  buf=zyab

First mystery: why is PerlIO required, and why isn't the requirement 
autodetected and included?

d:\MY\PERL\src>pp --output test.exe

Can't locate in @INC (@INC contains: 
CODE(0xe3c75c) . CODE(0xe3c87c)) at script/ line 8.
BEGIN failed--compilation aborted.

Second mystery: after adding -M PerlIO, why does the open fail?

d:\MY\PERL\src>pp -M PerlIO --output test.exe

can't open string fh: No such file or directory at script/ line 8.

Glenn --
A protocol is complete when there is nothing left to remove.
-- Stuart Cheshire, Apple Computer, regarding Zero Configuration Networking

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About