Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Re: Undefined subroutine

by J9 (Beadle)
on Mar 11, 2003 at 14:35 UTC ( [id://242045]=note: print w/replies, xml ) Need Help??


in reply to Re: Undefined subroutine
in thread Undefined subroutine

I have run
perl -MTest -le print $INC{"J9Test.pm"};
(as I renamed my module) on my MS machine but get a blank line returned.

Replies are listed 'Best First'.
Re: Re: Re: Undefined subroutine
by broquaint (Abbot) on Mar 11, 2003 at 14:45 UTC
    ... (as I renamed my module) on my MS machine but get a blank line returned.
    That's to be expected as you're no longer including Test.pm. If you change the -M switch to -MJ9Test it will output the path to J9Test.pm relative to @INC.
    HTH

    _________
    broquaint

      BLUSH..

      Tried ...
      perl -MJ9Test -le print $INC{"J9Test.pm"};
      Still got a blank line though.
        Quotes are your friend ...
        shell> cat > J9Test.pm package J9Test; 1; shell> perl -MJ9Test -le print $INC{"J9Test.pm"}; shell> perl -MJ9Test -le print@ARGV $INC{"J9Test.pm"}; {J9Test.pm} shell> perl -MJ9Test -le 'print $INC{"J9Test.pm"};' J9Test.pm
        Although the above was performed on a linux box using bash (so you might get a different result in a different shell), I'm pretty sure that $INC{"J9Test.pm"} is being passed as the last argument to perl.
        HTH

        _________
        broquaint

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://242045]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (3)
As of 2024-04-20 16:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found