Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Module problem: can't locate object method

by !1 (Hermit)
on Jan 03, 2004 at 16:25 UTC ( #318521=note: print w/replies, xml ) Need Help??


in reply to Module problem: can't locate object method

I think it will be helpful if you make certain that there's no other conf module that perl might be trying to load. Check the path of conf.pm and then run:

perl -mconf -le'print $INC{"conf.pm"}'

If the paths don't match, then you might want to consider putting use lib "directory_of_module"; before use conf; in socket.pm to move the directory to the beginning of @INC. If the paths do match then you have a different problem. Check to make certain that you don't have a typo in the package declaration of conf.pm. For instance:

package cpnf; # ^-- typo, now we can't find package conf ...

Beyond that, does the subroutine appear after an __END__ or __DATA__? Hopefully something in this rant is useful.

Update: Cleaned up and provided an example.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2021-09-24 08:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?