Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Undefined subroutine

by broquaint (Abbot)
on Mar 11, 2003 at 14:11 UTC ( [id://242029]=note: print w/replies, xml ) Need Help??


in reply to Undefined subroutine

Try the following bit of code (with appropriate quoting rules per prompt)
shell> perl -MTest -le 'print $INC{"Test.pm"};
If you get something like
/usr/lib/perl5/5.6.1/Test.pm
Then you either need to force the @INC to look for your module first with a liberal use of use lib or rename your module.
HTH

_________
broquaint

Replies are listed 'Best First'.
Re: Re: Undefined subroutine
by J9 (Beadle) on Mar 11, 2003 at 14:35 UTC
    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.
      ... (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.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2024-04-23 14:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found