NAME |
Synopsis |
Description |
Distributions |
Usage |
Options |
OS-specific Code |
Files Shipped |
Slashes 'v' Backslashes |
Credits |
Author |
Copyright |
NAME
Synopsisuse Module::MakeDist; # Work in /perl-modules/Module-MakeDist-1.00/. Module::MakeDist -> new ( name => 'Module::MakeDist', verbose => 0, version => '1.00', work_dir => '/perl-modules', ); DescriptionSay we have a new module, KillerApp V 1.00, and in it's directory KillerApp-1.00/ are these files:
Then this module processes the directory KillerApp-1.00/, and generates all files required to create shippable distributions (distros) in both Unix-style and ActiveState-style (ppm) formats. Files created are:
We do not use any external programs such as tar, gzip or zip. DistributionsThis module is available both as a Unix-style distro (*.tgz) and an ActiveState-style distro (*.ppd). The latter is shipped in a *.zip file. See http://savage.net.au/Perl-modules/html/installing-a-module.html for help on unpacking and installing each type of distro. UsageAs you can see from the program in the synopsis, which is the code I used to generate the distros for this very module, the class does all its work in the constructor. You do not call any other methods. OptionsHere, in alphabetical order, are the options accepted by the constructor, together with their default values.
So, the example in the synopsis would mean this module attempts to work in '/perl-modules/Module-MakeDist-1.00/'. We use File::Spec to join the directory names. OS-specific CodeThere are 2 places where the read-only bit on a file is reset. The code uses $Config{'osname'} to look for a small selection of known OSes, and uses OS-specific commands for 'MSWin32' and 'linux' to do the reset. Patches are welcome. Files ShippedSee the source for subs called _what_to_gzip and _what_to_zip. Such lists of files which 'ought to be shipped' can be extended indefinitely. Hopefully, no real argument will ensue. However, if you do believe specific extra files should be included in the Unix-style distro, please let me know. Slashes 'v' BackslashesPerl is, and various Perl programs are, a bit of a mess when it comes to processing directory separators:
CreditsI gained important information from these sources: Author
Home page: http://savage.net.au/index.html CopyrightAustralian copyright © 2002, Ron Savage. All rights reserved. All Programs of mine are 'OSI Certified Open Source Software'; you can redistribute them and/or modify them under the terms of The Artistic License, a copy of which is available at: http://www.opensource.org/licenses/index.html |
| Top of page |