|Just another Perl shrine
Re: Making a distribution for my websiteby gone2015 (Deacon)
|on Feb 06, 2009 at 18:23 UTC
If you're trying to find out what modules your program is using, then the following piece of magic may suffice:
if inserted at the start of your program, just before it ends it will print to STDERR all the module file names it has seen require and/or use for. Which may give you a fighting chance of constructing a suitable install package.
Mind you, this will miss any require operations which your test run does not actually execute... I cannot imagine that this will be a problem, but it's tricky to guarantee. If that worries you, you can try:
which has a stab at scanning all the required files, looking for require statements for modules (ignores version numbers) that refer to modules that are not already known.
NB: this comes without warranty of any kind, in particular no warranty of fitness for any purpose whatsoever; and if you use this you acknowledge that such exclusion of warranty is entirely reasonable, given the level of the fee :-)