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

Re: CGI script organisation

by tradez (Pilgrim)
on Jan 27, 2002 at 12:54 UTC ( [id://141907]=note: print w/replies, xml ) Need Help??


in reply to CGI script organisation

If you set your @INC correctly, you should be able to put your modules in any directory inside of it. Do this for me:
someuser@somebox:~$ perl foreach $entry (@INC) { print "$entry \n"; } /usr/lib/perl5/5.6.1/i686-linux /usr/lib/perl5/5.6.1 /usr/lib/perl5/site_perl/5.6.1/i686-linux /usr/lib/perl5/site_perl/5.6.1 /usr/lib/perl5/site_perl .
This is a list of easy to use places you should be able to stick a .pm file. For kicks lets use
/usr/lib/perl5/site_perl/5.6.1/i686-linux Place your whatever.pm files in that directory. Then withing your perl file simply place
#!/usr/bin/perl -T use whatever; #that pre .pm name of the file you used
This will then scope your functions that you need to your current namespace. Have fun. Also read up on packaging to add another layer of power :). BTW mediators, if I am off a little on my logic, take it easy on me, is late :).
Tradez
"Never underestimate the predicability of stupidity"
- Bullet Tooth Tony, Snatch (2001)

Log In?
Username:
Password:

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

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

    No recent polls found