Skip Menu |

This queue is for tickets about the Module-ScanDeps CPAN distribution.

Report information
The Basics
Id: 30743
Status: resolved
Priority: 0/
Queue: Module-ScanDeps

People
Owner: Nobody in particular
Requestors: schmorp [...] schmorp.de
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.77
Fixed in: (no value)



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 -=====/_/_//_/\_,_/ /_/\_\
Thanks for the bug report. I took the liberty to move it to the Module::ScanDeps queue. A contributor to Module::ScanDeps had introduced that regex check on the file names presumably because ScanDeps is a pile of hacks which tends to be very liberal wrt what it includes. The current fix is to allow files without suffixes to be scanned as well (by default). Eventually, that check would have to be replaced with something that determines whether the file contains Perl code or not. However, that's not a simple task to do reliably as you may imagine. What would really have to be done is an entire rewrite of that crufty module with PPI. Of course, even then, you would need various hacks for things like the typical Tk autoloading mechanisms. (Or Module::Pluggable, etc.) I'll try to prepare a M::SD release (0.78) asap. I am not sure whether I have access to the necessary keys for the signatures here in Argentina, though. Until then, you can check out the trunk from svn.openfoundry.org/par/Module-ScanDeps/trunk Regards, Steffen