Beefy Boxes and Bandwidth Generously Provided by pair Networks httptech
No such thing as a small change
 
PerlMonks  

Re: Creating module files from subroutines

by Caillte (Friar)
on Apr 17, 2001 at 10:58 UTC ( [id://73098]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Creating module files from subroutines

The first thing you must do is read through the perlmod documentation so you understand exactly what it is modules do and how they interact with the calling program. I would also recommend strongly that you read the entry on the @INC variable in perlvar. Understanding this is also important.

After that, determine the directory structure and name for your module, like Mymods/Thismod.pm, create the file and place your subs within the skeleton below:

package Mymods::Thismod; ### YOUR CODE GOES HERE ### 1;

If you have read the documentation recommended then this will all come clear to you.

Update Make sure you read through frankus' post above too, all the comments he makes about your code are well worth following.

$japh->{'Caillte'} = $me;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://73098]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.