in reply to How can I create a Bundle quickly and easily?

It's easy to monitor the behavior of require/use in your script. For instance, this script will run another Perl program and print out whatever files it's loading to STDERR:

#!/usr/bin/perl -w my $db = <<'EOF'; sub DB::postponed { my $glob = shift; $glob =~ s/.*::_<//; print STDERR "loading $glob\n"; } sub DB::DB { } EOF ($ENV{PERL5DB} = $db) =~ tr/\n/ /; system($^X, '-d', @ARGV);

Just run it on another program like this:
perl watchRequire.pl myProgram.pl arg1 arg2 2>required

update: hmm... seems useful, so I put it into Code.

Replies are listed 'Best First'.
Re: Re: How can I create a Bundle quickly and easily?
by zakzebrowski (Curate) on Jul 26, 2001 at 22:08 UTC
    Annoying note - reminder that if you use settings that perl can't interpet (eg odbc calls on windows machines to databases which are different / don't exist , expecting certain directories which doesn't exist on target machine, etc) you will have to hand jab those settings onto the production machine.

    ----
    Zak