Boldra has asked for the wisdom of the Perl Monks concerning the following question:
c:\temp\test\lib\strict.pm:
c:\temp\test\test.pl:package strict; $VERSION = 1001; 1;
Then when packaging I get:use strict 100; print "strict=$INC{'strict.pm'}\n";
The warning about the unquoted string doesn't really interest me. The point is that -x works (finds strict version 1001), but -c (or -o) doesn't work.C:\temp\test>c:\strawberry\perl\bin\perl.exe c:\strawberry\perl\bin\pp + -x -I lib test.pl strict=lib/strict.pm Unquoted string "prefork" may clash with future reserved word at c:/st +rawberry/perl/site/lib/PAR.pm line 16, <_FH> chunk 1. C:\temp\test>c:\strawberry\perl\bin\perl.exe c:\strawberry\perl\bin\pp + -c -I lib test.pl strict version 100 required--this is only version 1.04 at GbLRp4 line +4. BEGIN failed--compilation aborted at GbLRp4 line 4. Couldn't open GbLRp4.out at c:/strawberry/perl/site/lib/Module/ScanDep +s.pm line 1266.
What I'm trying to do is create a portable binary, with a different version of a library which is also in core. It seems that when I try to create an exe (with -o or -c), my local strict.pm is ignored in favour of the global one. In reality it's Win32::TieRegistry I'm trying to distribute with my exe (because the cpan version still doesn't include this patch).
I've also tried adding -Ilib to the perl switches (between perl.exe and pp). As a workaround I will update my global version of the module just for compiling :(.
Thanks for any help on this.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: strawberry par::packer, @INC and the difference between -c and -x
by Anonymous Monk on Nov 26, 2009 at 10:48 UTC | |
|
Re: strawberry par::packer, @INC and the difference between -c and -x
by morgon (Priest) on Nov 27, 2009 at 23:42 UTC |