Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

mako132 (2925)

Journal of mako132 (2925)

Tuesday July 09, 2002
04:16 PM

Will This Madness Never End?

[ #6244 ]
Jeeze, I spend as much time futzing with Perl module installs as I do coding. What I need is something that shows me what modules (and version) my script is using so that I figure out why the @##$^#$^ thing works like a charm on one OS but barfs 'Use of uninitialized value ...' in another.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • > What I need is something that shows me what
    > modules (and version) my script is using

    how about which lib directory those modules are being
    loaded from? The following END block will do all of
    that for you. Note that you may need to have it print
    to a log file or something instead of the currently-
    selected filehandle. ((Code at end of this post.))

    You can create a trivial test script that has just a
    shebang line, then use's several modules, then has
    this END block. It should spew your info to STDOUT.

    Once
    • Yow! Thanks! I'll try it. My first guess was some BEGIN block vodoo (but I hadn't yet given it real thought). I'm going to rig up some Test:: stuff also. I tend to develop in FreeBSD and Linux and then go production on Solaris so I'll write me up a good test script...
      • > My first guess was some BEGIN block

        You could put that in a BEGIN block instead of an END block
        if you wanted. It would still work... however, it would miss
        two classes of modules:

            1) any modules use()'ed after the BEGIN block

            2) any modules require()'ed rather than use()'ed
               whether before or after the BEGIN block or in
               some other module

        By sticking it in an END block, you catch both of the above
        classes of modules. Nothing's