in reply to Re: module location
in thread module location

It would, but how in test.pl can I tell that 'DBI' was specified on the command line? test.pl needs to know that.

I have to say I like your signature quote - "efficiency is intelligent laziness". I'm going to remember that one ;)

Replies are listed 'Best First'.
Re: Re: Re: module location
by BrowserUk (Patriarch) on Nov 07, 2003 at 16:43 UTC

    The answer to that would depend on why the script needs to know that. Ie. What will the script do different?

    I guess I'm having trouble trying to conceive of why you would make the module a command line argument rather than having it inside the script. I originally thought that you might have two or modules that offer the same interface, but different implementation. This would mean that the rest of the script wouldn't care which of the alternative modules was loaded, it would just use the exported entrypoints from whichever one was loaded.


    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "Think for yourself!" - Abigail
    Hooray!
    Wanted!

Re: Re: Re: module location
by Anonymous Monk on Nov 08, 2003 at 12:11 UTC
    It would, but how in test.pl can I tell that 'DBI' was specified on the command line? test.pl needs to know that.
    Yes, and this is Perl ;)
    perl -MDBI -le'print for keys %INC' Exporter.pm Carp.pm strict.pm vars.pm Config.pm warnings/register.pm warnings.pm DynaLoader.pm Exporter/Heavy.pm DBI.pm AutoLoader.pm