Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Custom module problems

by freddo411 (Chaplain)
on May 02, 2006 at 17:52 UTC ( [id://546961]=note: print w/replies, xml ) Need Help??


in reply to Custom module problems

I am told by this place that I can put my module into a special directory and reference it like so:
use lib qw(/myPerl/myModules/); use sqlsupport;
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

-------------------------------------
Nothing is too wonderful to be true
-- Michael Faraday

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (7)
As of 2024-04-19 08:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found