|
|
| No such thing as a small change | |
| PerlMonks |
Re: Creating module files from subroutinesby 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.
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:
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;
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||