Category: | Miscellaneous |
Author/Contact Info | Ned Konz, bikeNomad, ned@bike-nomad.com |
Description: | This little script will monitor the behavior of require/use in your script. It will run another Perl program and print out whatever files it's loading to STDERR. Just run it on another program like this:
|
# Run another Perl program and print list of loaded files to STDERR #!/usr/bin/perl -w my $db = <<'EOF'; sub DB::postponed { my $glob = shift; $glob =~ s/.*::_<//; print STDERR "$glob\n"; } sub DB::DB { } EOF ($ENV{PERL5DB} = $db) =~ tr/\n/ /; system($^X, '-d', @ARGV); |
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Monitor file require/use
by khippy (Scribe) on Jul 27, 2001 at 17:15 UTC | |
by bikeNomad (Priest) on Jul 27, 2001 at 17:52 UTC | |
by khippy (Scribe) on Jul 30, 2001 at 14:02 UTC | |
by bikeNomad (Priest) on Jul 30, 2001 at 19:34 UTC |
Back to
Code Catacombs