Subject: | dependencies not included anymore with PAR::Packer 0.976 |
Date: | Thu, 15 Nov 2007 00:17:47 +0100 |
To: | bug-par [...] rt.cpan.org |
From: | Marc Lehmann <schmorp [...] schmorp.de> |
(If you read my earleir bug report, it turned out that this was causing
the problem: -I "//.host/Shared Folders/root/src/Crossfire". pp tried to
open this directory as file and failed).
I found that my program .exe shrunk from 12.5 MB to 9.8MB after upgrading to
PAR::Packer 0.976. Great, the problem is, none of the depending modules are
included in it anymore. This is the commandline I used:
pp --icon win32/client.ico -C -I . -o deliantra.exe -A addlist bin/deliantra
(If you want to look, this is bin/deliantra from the CFPlus module). None of
the modules in the "use" or "require" statements are being included, and I
have no indication why, as I can't see anything that I am doing wrong.
I have palyed around with -c and -x to no avail. Reading something about
Module::ScanDeps, I tried to use scandeps.pl on the file:
*$ /c/perl/bin/perl c:/perl/bin/scandeps.pl bin/deliantra
No modules found!
/c/perl/bin/perl c:/perl/bin/scandeps.pl -V bin/deliantra
Skipping input file bin/deliantra because it matches $Module::ScanDeps::ScanFileRE
No modules found!
# Legend: [C]ore [X]ternal [S]ubmodule [?]NotOnCPAN
I looked at $Module::ScanDeps::ScanFileRE, but I cannot see how "deliantra" would match it, as it seems
to be able to match only perl libraries (.pl), modules (.pm) tests (wow) and autoload files:
$ScanFileRE = qr/\.(?i:p[ml]|t|al)/;
this definitely doesn't match deliantra, as the message says (or any perl
script for that matter).
Also, this precludes any executable scripts to be scanned for dependencies
(which I always thought was one of the main points of par).
Maybe I am using it wrong, and maybe the Module::ScanDeps issue is a
non-issue, but it seems PAR::Packer 0.976 is completely hosed and unable
to pack perl scripts anymore.
As I found no way to override this peculiar regex, I patched the
ScanDeps.pm file directly and replaced the regex by ".", and, sure enough,
suddenly pp includes dependencies again.
Since packing perl scripts is such a useful thing, could it be supported
again in future versions?
--
The choice of a Deliantra, the free code+content MORPG
-----==- _GNU_ http://www.deliantra.net
----==-- _ generation
---==---(_)__ __ ____ __ Marc Lehmann
--==---/ / _ \/ // /\ \/ / pcg@goof.com
-=====/_/_//_/\_,_/ /_/\_\