ExtUtils::ModuleMaker - A simple replacement for h2xs -XA
h2xs can be used for pure perl modules using the -XA flags. But it has many annoying features. ExtUtils::ModuleMaker is designed to bring module templates into the 21st Century.
In the simplest case it can be used from the command line as
perl -MExtUtils::ModuleMaker -e "Quick_Module ('Sample::Module::Foo')"
This module is a replacement for h2xs. It can be used from the command line with just a module name, similar to h2xs, or can be called from a Modulefile.PL similar to calling MakeMaker from Makefile.PL.
use ExtUtils::ModuleMaker; Generate_Module_Files ( NAME => 'Sample::Module::Foo', ABSTRACT => 'a sample module', AUTHOR => {NAME => 'A. U. Thor', EMAIL => 'a.u.thor@a.galaxy.far.far.away', CPANID => 'AUTHOR', WEBSITE => 'http://a.galaxy.far.far.away/modules', }, VERSION => 0.01, LICENSE => 'perl', EXTRA_MODULES=> [ { NAME => 'Sample::Module::Bar', ABSTRACT => 'a second module', }, { NAME => 'Sample::Baz', ABSTRACT => 'a third module', }, ], );
Still only supports the simple perl only modules, not things with XS components.
Send email to modulemaker@PlatypiVentures.com.
R. Geoffrey Avery CPAN ID: RGEOFFREY modulemaker@PlatypiVentures.com http://www.PlatypiVentures.com/perl/modules/ModuleMaker.shtml
Copyright (c) 2001 R. Geoffrey Avery. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
h2xs, ExtUtils::MakeMaker
Each public function/method is described here. These are how you should interact with this module.
Usage : perl -MExtUtils::ModuleMaker -e "Quick_Module ('Sample::Module')" or use ExtUtils::ModuleMaker; Quick_Module ('Sample::Module'); Purpose : Creates a Module.pm with supporing files Returns : n/a Argument : A name for the module, like 'Module' or 'Sample::Module' Throws : Comments : More closely mimics h2xs behavior than Generate_Module_Files. : Included to allow simple creation from a command line.
See Also : Generate_Module_Files
Usage : How to use this function/method Purpose : Creates one or more modules with supporing files Returns : n/a Argument : A hash with the information for the new module(s) Throws : Comments :
See Also : Verify_Data, Create_Changes, Create_Makefile, Create_README, : Create_Module, Create_MANIFEST
The only required feature. This is the name of the primary module (with '::' separators if needed).
A short description of the module, this will be passed on to MakeMaker through Makefile.PL.
A real number to be the version number. The default is 0.01.
Which license to include in the Copyright section. You can choose one of the standard licenses by including 'perl', 'gpl', 'artistic', and 18 others approved by opensource.org. The default is to choose the 'perl' flavor which is to share it "under the same terms as Perl itself". Any other value is passed on directly so you can have any license you want.
When set to 'custom', you get the opportunity to specify exactly these fields...
Text to appear in the COPYRIGHT section of the pod
The text for the LICENSE file
A hash contining information about the author to pass on to all the necessary places in the files.
Name of the author.
Email address of the author.
The CPANID of the author. If this is omited, then the line will not be added to the documentation.
The personal or organizational website of the author.
An array of hashes that each contain values for NAME and ABSTRACT. Each extra module will be created in the correct relative place in the <b>lib directory, but no extra supporting documents, like README or Changes.
This is one major improvement over the earlier <b>h2xs as you can now build multi module packages.
Each private function/method is described here. These methods and functions are considered private and are intended for internal use by this module. They are not considered part of the public interface and are described here for documentation purposes only.
Usage : Purpose : To fill in default values for unspecified features Returns : n/a Argument : pointer to hash of data for modules Throws : Comments :
See Also : Create_Base_Directory
Usage : Purpose : Create the directory where all the files will be created. Returns : $DIR = directory name where the files will live Argument : $package_name = name of module separated by '::' Throws : Comments :
See Also : Check_Dir
Usage : Check_Dir ($dir, $MODE); Purpose : Creates a directory with the correct mode if needed. Returns : n/a Argument : $dir = directory name $MODE = mode of directory (e.g. 0777, 0755) Throws : Comments :
See Also :
Usage : Create_Makefile ($p_module_data); Purpose : Write the Makefile.PL file Returns : n/a Argument : $p_module_data = hash with all the data Throws : Comments :
Usage : Create_Changes ($p_module_data); Purpose : Returns : n/a Argument : $p_module_data = hash with all the data Throws : Comments :
Usage : Create_License ($p_module_data); Purpose : Returns : n/a Argument : $p_module_data = hash with all the data Throws : Comments :
Usage : Create_MANIFEST ($p_module_data); Purpose : Returns : n/a Argument : $p_module_data = hash with all the data Throws : Comments :
Usage : Create_README ($p_module_data); Purpose : Returns : n/a Argument : $p_module_data = hash with all the data Throws : Comments :
Usage : Purpose : Returns : Argument : Throws : Comments :
To install ExtUtils::ModuleMaker, copy and paste the appropriate command in to your terminal.
cpanm
cpanm ExtUtils::ModuleMaker
CPAN shell
perl -MCPAN -e shell install ExtUtils::ModuleMaker
For more information on module installation, please visit the detailed CPAN module installation guide.