in reply to Re: Which modules does somescript.pl use?
in thread Which modules does somescript.pl use?

Can I get this to run before the script exits? I'm trying to debug a script, and don't know where it's failing, which is why I need the module.
  • Comment on Re^2: Which modules does somescript.pl use?

Replies are listed 'Best First'.
Re^3: Which modules does somescript.pl use?
by gellyfish (Monsignor) on Apr 14, 2005 at 10:20 UTC

    Sure, add something like:

    use Data::Dumper; END { print Dumper \%INC }
    at the top of the program file.

    /J\

      Great thanks!
Re^3: Which modules does somescript.pl use?
by Taulmarill (Deacon) on Apr 14, 2005 at 10:20 UTC
    you can print out %INC at anny time you want to ;)
    modules that are importet by use are done in compile time, so they are in %INC right from the start. if you actualy use require, those modules should appear after you "required" them.
Re^3: Which modules does somescript.pl use?
by jimrobertsiii (Scribe) on Apr 14, 2005 at 12:06 UTC
    The perl debugger is your friend (though not a very pretty one ;-)

    Check out perldebtut.(perldoc perldebtut)

    -Jim