Wednesday, November 02, 2005

Perl: creating modules

- Perl is distributed with a program called h2xs. it will be used to generate skeletion files for a new module.

- h2xs -AXc -n NewModule

- edit NewModuel.pm

- run perl Makefile.PL
make
make install

- use NewModule
NewModule->functions

The Changes file is where you might keep track keep track of changes you make to your module as you write new versions

MANIFEST contains a list of files in this directory. If you add new files to the directory, you should also add them to the MANIFEST. The MANIFEST is used to create a tarball of your module for distribution, and it's also checked when people unpack the tarball and install the module

Makefile.PL is a Perl program used to create a Unix Makefile. You'll use this Makefile to test and install your module.

NewModule.pm is your module. You'll write the code here in the next step.

0 Comments:

Post a Comment

<< Home