Welcome to the Monastery | |
PerlMonks |
Re: Custom module problemsby freddo411 (Chaplain) |
on May 02, 2006 at 17:52 UTC ( [id://546961]=note: print w/replies, xml ) | Need Help?? |
I am told by this place that I can put my module into a special directory and reference it like so:In addition to the need for export and the sage advice on capitalization, you'll want to understand that "use <Module>" is looking for either a file "Module" or more commonly "Module.pm". By convention, the package inside of the file "Module.pm" is "Module". The later is the 'best practices' way to do it. Note that you don't specify the .pm extention in the use directive, nor do you specify it in the package name. Since use actually calls require to do some its work, this is explained in the docs for require. You can read the 'use' docs here. Cheers --Freddo411 -------------------------------------
In Section
Seekers of Perl Wisdom
|
|