cvs commit: perlfaq perlfaq7.pod
[email protected] (brian d foy) 21 Jan 2005 12:10:22 -0000
| Newsgroups | perl.cvs.perlfaq |
|---|---|
| Message-ID | <[email protected]> |
cvsuser 05/01/21 04:10:22
Modified: . perlfaq7.pod
Log:
* How do I create a module?
+ rewrote answer to point at most of the relevant perldocs
+ mention other tools for starting module
Revision Changes Path
1.21 +21 -15 perlfaq/perlfaq7.pod
Index: perlfaq7.pod
===================================================================
RCS file: /cvs/public/perlfaq/perlfaq7.pod,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- perlfaq7.pod 3 Jan 2005 18:43:37 -0000 1.20
+++ perlfaq7.pod 21 Jan 2005 12:10:22 -0000 1.21
@@ -1,6 +1,6 @@
=head1 NAME
-perlfaq7 - General Perl Language Issues ($Revision: 1.20 $, $Date: 2005/01/03 18:43:37 $)
+perlfaq7 - General Perl Language Issues ($Revision: 1.21 $, $Date: 2005/01/21 12:10:22 $)
=head1 DESCRIPTION
@@ -176,20 +176,26 @@
=head2 How do I create a module?
-A module is a package that lives in a file of the same name. For
-example, the Hello::There module would live in Hello/There.pm. For
-details, read L<perlmod>. You'll also find L<Exporter> helpful. If
-you're writing a C or mixed-language module with both C and Perl, then
-you should study L<perlxstut>.
-
-The C<h2xs> program will create stubs for all the important stuff for you:
-
- % h2xs -XA -n My::Module
-
-The C<-X> switch tells C<h2xs> that you are not using C<XS> extension
-code. The C<-A> switch tells C<h2xs> that you are not using the
-AutoLoader, and the C<-n> switch specifies the name of the module.
-See L<h2xs> for more details.
+(contributed by brian d foy)
+
+L<perlmod>, L<perlmodlib>, L<perlmodstyle> explain modules
+in all the gory details. L<perlnewmod> gives a a brief
+overview of the process along with a couple of suggestions
+about style.
+
+If you need to include C code or C library interfaces in
+your module, you'll need h2xs. h2xs will create the module
+distribution structure and the initial interface files
+you'll need. L<perlxs> and L<perlxstut> explain the details.
+
+If you don't need to use C code, other tools such as
+ExtUtils::ModuleMaker and Module::Starter, can help you
+create a skeleton module distribution.
+
+You may also want to see Sam Tregar's "Writing Perl Modules
+for CPAN" ( http://apress.com/book/bookDisplay.html?bID=14 )
+which is the best hands-on guide to creating module
+distributions.
=head2 How do I create a class?