[svn:Module-Build] r12851 - Module-Build/trunk/lib/Module/Build

[email protected]
Newsgroups perl.module.build.checkins
Message-ID <[email protected]>
Author: schwern
Date: Tue Jun 16 13:17:19 2009
New Revision: 12851

Modified:
   Module-Build/trunk/lib/Module/Build/API.pod

Log:
Add some docs on what a PL file is supposed to look like.

Modified: Module-Build/trunk/lib/Module/Build/API.pod
==============================================================================
--- Module-Build/trunk/lib/Module/Build/API.pod	(original)
+++ Module-Build/trunk/lib/Module/Build/API.pod	Tue Jun 16 13:17:19 2009
@@ -574,8 +574,9 @@
 
 An optional parameter specifying a set of C<.PL> files in your
 distribution.  These will be run as Perl scripts prior to processing
-the rest of the files in your distribution.  They are usually used as
-templates for creating other files dynamically, so that a file like
+the rest of the files in your distribution with the name of the file
+they're generating as an argument.  They are usually used as templates
+for creating other files dynamically, so that a file like
 C<lib/Foo/Bar.pm.PL> might create the file C<lib/Foo/Bar.pm>.
 
 The files are specified with the C<.PL> files as hash keys, and the
@@ -602,6 +603,18 @@
                'lib/funny.PL'      => [],
               }
 
+Here's an example of a simple PL file.
+
+    my $output_file = shift;
+    open my $fh, ">", $output_file or die "Can't open $output_file: $!";
+
+    print $fh <<'END';
+    #!/usr/bin/perl
+
+    print "Hello, world!\n";
+    END
+
+
 =item pm_files
 
 [version 0.19]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.