module-build-checkins Mailing List for Module::Build (Page 13)
Status: Beta
Brought to you by:
kwilliams
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(82) |
Dec
(58) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(49) |
Feb
(57) |
Mar
(49) |
Apr
(49) |
May
(2) |
Jun
(147) |
Jul
(60) |
Aug
(55) |
Sep
(51) |
Oct
(68) |
Nov
(61) |
Dec
(44) |
2006 |
Jan
(27) |
Feb
(38) |
Mar
(89) |
Apr
(31) |
May
(17) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Randy W. S. <si...@us...> - 2005-11-03 01:08:39
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2806/lib/Module/Build Modified Files: Authoring.pod Cookbook.pm Log Message: Alter documentation to reflect support for PREFIX-style install paths. Index: Cookbook.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Cookbook.pm,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- Cookbook.pm 1 Nov 2005 09:58:37 -0000 1.15 +++ Cookbook.pm 3 Nov 2005 01:08:31 -0000 1.16 @@ -245,7 +245,7 @@ F<script/>, F<bindoc/>, F<libdoc/>, and F<html/> (some of these may be missing or empty if there's nothing to go in them). Anything copied to these directories during the build will eventually be installed -during the C<install> action (see L<Module::Build/"How Installation Paths are Determined">. +during the C<install> action (see L<Module::Build/"INSTALL PATHS">. If you need to create a new type of installable element, e.g. C<conf>, then you need to tell Module::Build where things in F<blib/conf/> Index: Authoring.pod =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Authoring.pod,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- Authoring.pod 1 Nov 2005 09:58:37 -0000 1.16 +++ Authoring.pod 3 Nov 2005 01:08:31 -0000 1.17 @@ -389,7 +389,7 @@ Determines where files are installed within the normal perl hierarchy as determined by F<Config.pm>. Valid values are: C<core>, C<site>, C<vendor>. The default is C<site>. See -L<Module::Build/"How Installation Paths are Determined"> +L<Module::Build/"INSTALL PATHS"> =item license |
From: Randy W. S. <si...@us...> - 2005-11-02 01:36:09
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29648/lib/Module/Build Modified Files: Base.pm Log Message: Missed setting 'invoke_action' in dispatch() when no arguments are passed in. Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.511 retrieving revision 1.512 diff -u -d -r1.511 -r1.512 --- Base.pm 1 Nov 2005 09:34:22 -0000 1.511 +++ Base.pm 2 Nov 2005 01:36:01 -0000 1.512 @@ -1222,6 +1222,7 @@ } die "No build action specified" unless $self->{action}; + local $self->{invoked_action} = $self->{action}; $self->_call_action($self->{action}); } |
From: Randy W. S. <si...@us...> - 2005-11-01 09:58:46
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15497/lib/Module/Build Modified Files: Authoring.pod Cookbook.pm Log Message: Document the C<invoked_action()> accessor, and clarify the behavior of C<current_action()>. Spellcheck PODs & standardize to two spaces between sentences. Index: Cookbook.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Cookbook.pm,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- Cookbook.pm 14 Apr 2005 02:49:12 -0000 1.14 +++ Cookbook.pm 1 Nov 2005 09:58:37 -0000 1.15 @@ -43,7 +43,7 @@ Build install The F<Build> script knows what perl was used to run C<Build.PL>, so -you don't need to reinvoke the F<Build> script with the complete perl +you don't need to re-invoke the F<Build> script with the complete perl path each time. If you invoke it with the I<wrong> perl path, you'll get a warning. @@ -68,7 +68,7 @@ Module::Build::Compat->run_build_pl(args => \@ARGV); Module::Build::Compat->write_makefile(); -Now CPAN will work as usual, ie: `perl Makefile.PL`, `make`, `make test`, +Now CPAN will work as usual, i.e.: `perl Makefile.PL`, `make`, `make test`, and `make install`. Alternatively, see the C<create_makefile_pl> parameter to the C<< @@ -110,7 +110,7 @@ =head2 Running a single test file C<Module::Builde> supports running a single test, which enables you to -track down errors more quickly. Use the following format: +track down errors more quickly. Use the following format: ./Build test --test_files t/mytest.t @@ -163,7 +163,7 @@ wrong. Or not find one at all. Therefore, if you want to explicitly tell C<Module::Build> which perl -binary you're targetting, you can override C<$Config{perlpath}>, like +binary you're targeting, you can override C<$Config{perlpath}>, like so: /foo/perl Build.PL --config perlpath=/foo/perl @@ -261,7 +261,7 @@ $b->install_path->{conf} || $installation_path; -(Sneakily, or perhaps uglyly, C<install_path()> returns a reference to +(Sneakily, or perhaps uglily, C<install_path()> returns a reference to a hash of install paths, and you can modify that hash to your heart's content.) Index: Authoring.pod =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Authoring.pod,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- Authoring.pod 18 Oct 2005 23:13:42 -0000 1.15 +++ Authoring.pod 1 Nov 2005 09:58:37 -0000 1.16 @@ -67,7 +67,7 @@ =item current() -This method returns a reasonable faxsimile of the currently-executing +This method returns a reasonable facsimile of the currently-executing C<Module::Build> object representing the current build. You can use this object to query its C<notes()> method, inquire about installed modules, and so on. This is a great way to share information between @@ -78,7 +78,7 @@ # In Build.PL: my $color = $build->prompt("What is your favorite color?"); $build->notes(color => $color); - + # In t/colortest.t: use Module::Build; my $build = Module::Build->current; @@ -154,16 +154,16 @@ split. In general I don't consider autosplitting a great idea, because it's -not always clear that -autosplitting achieves its intended performance benefits. It may even -harm performance in environments like mod_perl, where as much as -possible of a module's code should be loaded during startup. +not always clear that autosplitting achieves its intended performance +benefits. It may even harm performance in environments like mod_perl, +where as much as possible of a module's code should be loaded during +startup. =item build_class The Module::Build class or subclass to use in the build -script. Defaults to "Module::Build" or the class name passed to or -created by a call to C<subclass()>. This property is useful if you're +script. Defaults to "Module::Build" or the class name passed to or +created by a call to C<subclass()>. This property is useful if you're writing a custom Module::Build subclass and have a bootstrapping problem--that is, your subclass requires modules that may not be installed when C<perl Build.PL> is executed, but you've listed in @@ -212,10 +212,9 @@ This parameter tells Module::Build to automatically create a F<README> file at the top level of your distribution. Currently it will simply use C<Pod::Text> (or C<Pod::Readme> if it's installed) on the file -indicated by C<dist_version_from> and put -the result in the F<README> file. This is by no means the only -recommended style for writing a README, but it seems to be one common -one used on the CPAN. +indicated by C<dist_version_from> and put the result in the F<README> +file. This is by no means the only recommended style for writing a +README, but it seems to be one common one used on the CPAN. If you generate a F<README> in this way, it's probably a good idea to create a separate F<INSTALL> file if that information isn't in the @@ -267,7 +266,7 @@ /([\$*])(([\w\:\']*)\bVERSION)\b.*\=/ -, eval()-ing that line, then checking the value of the C<$VERSION> +eval()-ing that line, then checking the value of the C<$VERSION> variable. Quite ugly, really, but all the modules on CPAN depend on this process, so there's no real opportunity to change to something better. @@ -312,14 +311,15 @@ =item get_options -You can pass arbitrary command-line options to F<Build.PL> or F<Build>, and they will be -stored in the Module::Build object and can be accessed via the C<args()> -method. However, sometimes you want more flexibility out of your argument -processing than this allows. In such cases, use the C<get_options> parameter -to pass in a hash reference of argument specifications, and the list of -arguments to F<Build.PL> or F<Build> will be processed according to those -specifications before they're passed on to C<Module::Build>'s own argument -processing. +You can pass arbitrary command line options to F<Build.PL> or +F<Build>, and they will be stored in the Module::Build object and can +be accessed via the C<args()> method. However, sometimes you want +more flexibility out of your argument processing than this allows. In +such cases, use the C<get_options> parameter to pass in a hash +reference of argument specifications, and the list of arguments to +F<Build.PL> or F<Build> will be processed according to those +specifications before they're passed on to C<Module::Build>'s own +argument processing. The supported option specification hash keys are: @@ -328,8 +328,8 @@ =item type -The type of option. The types are those supported by Getopt::Long; consult -its documentation for a complete list. Typical types are C<=s> for strings, +The type of option. The types are those supported by Getopt::Long; consult +its documentation for a complete list. Typical types are C<=s> for strings, C<+> for additive options, and C<!> for negatable options. If the type is not specified, it will be considered a boolean, i.e. no argument is taken and a value of 1 will be assigned when the option is @@ -343,7 +343,7 @@ =item default -A default value for the option. If no default value is specified and no option +A default value for the option. If no default value is specified and no option is passed, then the option key will not exist in the hash returned by C<args()>. @@ -352,7 +352,7 @@ You can combine references to your own variables or subroutines with unreferenced specifications, for which the result will also be stored in the -has returned by C<args()>. For example: +has returned by C<args()>. For example: my $loud = 0; my $build = Module::Build->new( @@ -387,8 +387,8 @@ =item installdirs Determines where files are installed within the normal perl hierarchy -as determined by F<Config.pm>. Valid values are: C<core>, C<site>, -C<vendor>. The default is C<site>. See +as determined by F<Config.pm>. Valid values are: C<core>, C<site>, +C<vendor>. The default is C<site>. See L<Module::Build/"How Installation Paths are Determined"> =item license @@ -432,7 +432,7 @@ =item mozilla The distribution is licensed under the Mozilla Public -License. (http://opensource.org/licenses/mozilla1.0.php or +License. (http://opensource.org/licenses/mozilla1.0.php or http://opensource.org/licenses/mozilla1.1.php) =item open_source @@ -618,7 +618,7 @@ by the user. If the tools are helpful, they should also offer to install the dependencies. -A sysnonym for C<requires> is C<prereq>, to help succour people +A synonym for C<requires> is C<prereq>, to help succour people transitioning from C<ExtUtils::MakeMaker>. The C<requires> term is preferred, but the C<prereq> term will remain valid in future distributions. @@ -680,7 +680,7 @@ distribution), this method will run the F<Build.PL> and return the resulting C<Module::Build> object to the caller. Any key-value arguments given to C<new_from_context()> are essentially like -command-line arguments given to the F<Build.PL> script, so for example +command line arguments given to the F<Build.PL> script, so for example you could pass C<< verbose => 1 >> to this method to turn on verbosity. @@ -690,7 +690,7 @@ the auto-generated C<Build> script. The C<new()> method is only called once, when the user runs C<perl Build.PL>. Thereafter, when the user runs C<Build test> or another action, the C<Module::Build> -object is created using the C<resume()> method to reinstantiate with +object is created using the C<resume()> method to re-instantiate with the settings given earlier to C<new()>. =item subclass() @@ -744,14 +744,14 @@ my $arg_value = $build->args($key); $build->args($key, $value); -This method is the preferred interface for retreiving the arguments passed via -command-line options to F<Build.PL> or F<Build>, minus the Module-Build +This method is the preferred interface for retrieving the arguments passed via +command line options to F<Build.PL> or F<Build>, minus the Module-Build specific options. When called in in a scalar context with no arguments, this method returns a reference to the hash storing all of the arguments; in an array context, it -returns the hash itself. When passed a single argument, it returns the value -stored in the args hash for that option key. When called with two arguments, +returns the hash itself. When passed a single argument, it returns the value +stored in the args hash for that option key. When called with two arguments, the second argument is assigned to the args hash under the key passed as the first argument. @@ -806,7 +806,7 @@ =item check_installed_version($module, $version) Like C<check_installed_status()>, but simply returns true or false -depending on whether module C<$module> statisfies the dependency +depending on whether module C<$module> satisfies the dependency C<$version>. If the check succeeds, the return value is the actual version of @@ -823,7 +823,7 @@ If the check fails, we return false and set C<$@> to an informative error message. -If C<$version> is any nontrue value (notably zero) and any version of +If C<$version> is any non-true value (notably zero) and any version of C<$module> is installed, we return true. In this case, if C<$module> doesn't define a version, or if its version is zero, we return the special value "0 but true", which is numerically zero, but logically @@ -859,7 +859,7 @@ variable C<$name>. With two arguments, sets the given configuration variable to the given value. The value may be any perl scalar that's serializable with C<Data::Dumper>. For instance, if you write a -module that can use a MySQL or PostgreSQL backend, you might create +module that can use a MySQL or PostgreSQL back-end, you might create configuration variables called C<mysql_connect> and C<postgres_connect>, and set each to an array of connection parameters for C<< DBI->connect() >>. @@ -913,7 +913,16 @@ =item current_action() -Returns the name of the currently-running action, such as "build" or "test". +Returns the name of the currently-running action, such as "build" or +"test". This action is not necessarily the action that was originally +invoked by the user. For example, if the user invoked the "test" +action, current_action() would initially return "test". However, +action "test" depends on action "code", so current_action() will +return "code" while that dependency is being executed. Once that +action has completed, current_action() will again return "test". + +If you need to know the name of the original action invoked by the +user, see L<invoked_action()> below. =item dir_contains($first_dir, $second_dir) @@ -925,7 +934,7 @@ =item dispatch($action, %args) This method is also called from the auto-generated C<Build> script. -It parses the command-line arguments into an action and an argument +It parses the command line arguments into an action and an argument list, then calls the appropriate routine to handle the action. Currently (though this may change), an action C<foo> will invoke the C<ACTION_foo> method. All arguments (including everything mentioned @@ -1009,6 +1018,16 @@ built, C<libhtml> and C<binhtml>. Other user-defined types may also exist. +=item invoked_action() + +This is the name of the original action invoked by the user. This +value is set when the user invokes F<Build.PL>, the F<Build> script, +or programatically through the L<dispatch()> method. It does not +change as sub-actions are executed as dependencies are evaluated. + +To get the name of the currently executing dependency, see +L<current_action()> above. + =item notes() =item notes($key) @@ -1020,9 +1039,9 @@ different entities involved in the build. See the example in the C<current()> method. -The C<notes()> method is essentally a glorified hash access. With no -arguments, C<notes()> returns the entire hash of notes. With one argument, -C<notes($key)> returns the value associated with the given key. With two +The C<notes()> method is essentally a glorified hash access. With no +arguments, C<notes()> returns the entire hash of notes. With one argument, +C<notes($key)> returns the value associated with the given key. With two arguments, C<notes($key, $value)> sets the value associated with the given key to C<$value>. @@ -1036,17 +1055,17 @@ =item runtime_params($key) -The C<runtime_params()> method stores the values passed on the command-line -for valid properties (that is, any command-line options for which -C<valid_property()> returns a true value). The value on the command-line may +The C<runtime_params()> method stores the values passed on the command line +for valid properties (that is, any command line options for which +C<valid_property()> returns a true value). The value on the command line may override the default value for a property, as well as any value specified in a -call to C<new()>. This allows you to programmatically tell if C<perl Build.PL> -or any execution of C<./Build> had command-line options specified that +call to C<new()>. This allows you to programmatically tell if C<perl Build.PL> +or any execution of C<./Build> had command line options specified that override valid properties. -The C<runtime_params()> method is essentally a glorified read-only hash. With +The C<runtime_params()> method is essentally a glorified read-only hash. With no arguments, C<runtime_params()> returns the entire hash of properties -specified on the command-line. With one argument, C<runtime_params($key)> +specified on the command line. With one argument, C<runtime_params($key)> returns the value associated with the given key. The lifetime of the C<runtime_params> data is for "a build" - that is, the @@ -1059,7 +1078,7 @@ If you're subclassing Module::Build and some code needs to alter its behavior based on the current platform, you may only need to know -whether you're running on Windows, Unix, MacOS, VMS, etc. and not the +whether you're running on Windows, Unix, MacOS, VMS, etc., and not the fine-grained value of Perl's C<$^O> variable. The C<os_type()> method will return a string like C<Windows>, C<Unix>, C<MacOS>, C<VMS>, or whatever is appropriate. If you're running on an unknown platform, it @@ -1069,8 +1088,8 @@ =item prepare_metadata() This method is provided for authors to override to customize the -fields of F<META.yml>. It is passed a YAML::Node node object which can -be modified as desired and then returned. Eg. +fields of F<META.yml>. It is passed a YAML::Node node object which can +be modified as desired and then returned. E.g. package My::Builder; use base 'Module::Build'; @@ -1221,7 +1240,7 @@ C<module_name> parameter as passed to C<new()>. This module provides access to the data saved by these methods, and a way to update the values. There is also a utility script called C<config_data> -distributed with Module::Build that provides a command-line interface +distributed with Module::Build that provides a command line interface to this same functionality. See also the generated C<Foo::Bar::ConfigData> documentation, and the C<config_data> script's documentation, for more information. |
From: Randy W. S. <si...@us...> - 2005-11-01 09:58:45
|
Update of /cvsroot/module-build/Module-Build/lib/Module In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15497/lib/Module Modified Files: Build.pm Log Message: Document the C<invoked_action()> accessor, and clarify the behavior of C<current_action()>. Spellcheck PODs & standardize to two spaces between sentences. Index: Build.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build.pm,v retrieving revision 1.191 retrieving revision 1.192 diff -u -d -r1.191 -r1.192 --- Build.pm 31 Oct 2005 03:57:59 -0000 1.191 +++ Build.pm 1 Nov 2005 09:58:37 -0000 1.192 @@ -159,7 +159,7 @@ There are some general principles at work here. First, each task when building a module is called an "action". These actions are listed above; they correspond to the building, testing, installing, -packaging, etc. tasks. +packaging, etc., tasks. Second, arguments are processed in a very systematic way. Arguments are always key=value pairs. They may be specified at C<perl Build.PL> @@ -167,7 +167,7 @@ their values last for the lifetime of the C<Build> script. They may also be specified when executing a particular action (i.e. C<Build test verbose=1>), in which case their values last only for the -lifetime of that command. Per-action command-line parameters take +lifetime of that command. Per-action command line parameters take precedence over parameters specified at C<perl Build.PL> time. The build process also relies heavily on the C<Config.pm> module, and @@ -267,7 +267,7 @@ =item distcheck Reports which files are in the build directory but not in the -F<MANIFEST> file, and vice versa. (See L<manifest> for details) +F<MANIFEST> file, and vice versa. (See L<manifest> for details.) =item distclean @@ -311,7 +311,7 @@ documents) for any installable items under B<blib/> that contain POD. If there are no C<bindoc> or C<libdoc> installation targets defined (as will be the case on systems that don't support -Unix manpages) no action is taken for manpages. If there are no +Unix manpages) no action is taken for manpages. If there are no C<binhtml> or C<libhtml> installation targets defined no action is taken for html documents. @@ -334,7 +334,7 @@ =item html This will generate HTML documentation for any binary or library files -under B<blib/> that contain POD. The HTML documentation will only be +under B<blib/> that contain POD. The HTML documentation will only be installed if the install paths can be determined from values in C<Config.pm>. You can also supply or override install paths on the command line by specifying C<install_path> values for the C<binhtml> @@ -343,7 +343,7 @@ =item install This action will use C<ExtUtils::Install> to install the files from -C<blib/> into the system. See L<How Installation Paths are Determined> +C<blib/> into the system. See L<How Installation Paths are Determined> for details about how Module::Build determines where to install things, and how to influence this process. @@ -386,8 +386,8 @@ =item manpages This will generate man pages for any binary or library files under -B<blib/> that contain POD. The man pages will only be installed if the -install paths can be determined from values in C<Config.pm>. You can +B<blib/> that contain POD. The man pages will only be installed if the +install paths can be determined from values in C<Config.pm>. You can also supply or override install paths by specifying there values on the command line with the C<bindoc> and C<libdoc> installation targets. @@ -398,7 +398,7 @@ This action takes an optional argument C<codebase> which is used in the generated ppd file to specify the (usually relative) URL of the -distribution. By default, this value is the distribution name without +distribution. By default, this value is the distribution name without any path information. Example: @@ -486,7 +486,7 @@ =item testpod This checks all the files described in the C<docs> action and -produces C<Test::Harness>-style output. If you are a module author, +produces C<Test::Harness>-style output. If you are a module author, this is useful to run before creating a new release. =item versioninstall @@ -497,7 +497,7 @@ If you have the C<only.pm> module installed on your system, you can use this action to install a module into the version-specific library -trees. This means that you can have several versions of the same +trees. This means that you can have several versions of the same module installed and C<use> a specific one like this: use only MyModule => 0.55; @@ -518,15 +518,15 @@ =back -=head2 General Commandline Options +=head2 General Command Line Options -The following options can be used during any invokation of Build.PL or +The following options can be used during any invocation of Build.PL or the Build script, during any action. NOTE: There is some preliminary support for options to use the more -familiar long option style. Most options can be preceeded with the +familiar long option style. Most options can be preceded with the C<--> long option prefix, and the underscores changed to dashes -(e.g. --ignore-prereqs). Additionally, the argument to boolean options +(e.g. --ignore-prereqs). Additionally, the argument to boolean options is optional (e.g. --verbose), and boolean options can be negated by prefixing them with 'no' or 'no-' (e.g. --noverbose or --no-verbose). @@ -553,7 +553,7 @@ =item use_rcfile -Load the F<~/.modulebuildrc> option file. This option can be set to +Load the F<~/.modulebuildrc> option file. This option can be set to false to prevent the custom resource file from being loaded. =item verbose @@ -563,20 +563,20 @@ =back -=head2 Default Commandline Options (F<.modulebuildrc>) +=head2 Default Command Line Options (F<.modulebuildrc>) When Module::Build starts up, it will look for a file, -F<$ENV{HOME}/.modulebuildrc>. If the file exists, the options +F<$ENV{HOME}/.modulebuildrc>. If the file exists, the options specified there will be used as defaults, as if they were typed on the -command line. The defaults can be overridden by specifying new values +command line. The defaults can be overridden by specifying new values on the command line. The action name must come at the beginning of the line, followed by any -amount of whitespace and then the options. Options are given the same -as they would be on the commandline. They can be separated by any +amount of whitespace and then the options. Options are given the same +as they would be on the command line. They can be separated by any amount of whitespace, including newlines, as long there is whitespace at -the beginning of each continued line. Anything following a hash mark (C<#>) -is considered a comment, and is stripped before parsing. If more than +the beginning of each continued line. Anything following a hash mark (C<#>) +is considered a comment, and is stripped before parsing. If more than one line begins with the same action name, those lines are merged into one set of options. @@ -827,9 +827,10 @@ Many systems have Perl configs that make little sense with PREFIX. For example, OS X, where core modules go in F</System/Library/Perl/...>, user-installed modules go in -F</Library/Perl/...>, and man pages go in F</usr/share/man/...>. The PREFIX is thus set to F</>. -Install L<Foo::Bar> on OS X with C<PREFIX=/home/spurkis> and you get -things like F</home/spurkis/Library/Perl/5.8.1/Foo/Bar.pm> and +F</Library/Perl/...>, and man pages go in F</usr/share/man/...>. The +PREFIX is thus set to F</>. Install L<Foo::Bar> on OS X with +C<PREFIX=/home/spurkis> and you get things like +F</home/spurkis/Library/Perl/5.8.1/Foo/Bar.pm> and F</home/spurkis/usr/share/man/man3/Foo::Bar.3pm>. Not too pretty. The problem is not limited to Unix-like platforms, either - on Windows @@ -869,7 +870,7 @@ =head2 PREFIX will be supported The current maintainer of MakeMaker has offered to implement C<PREFIX> -pass-through support in Module::Build B<for backwards compatability +pass-through support in Module::Build B<for backwards compatibility only>. You are still strongly recommended to use C<install_base>. =head1 MOTIVATIONS |
From: Randy W. S. <si...@us...> - 2005-11-01 09:58:44
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15497 Modified Files: Changes Log Message: Document the C<invoked_action()> accessor, and clarify the behavior of C<current_action()>. Spellcheck PODs & standardize to two spaces between sentences. Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.395 retrieving revision 1.396 diff -u -d -r1.395 -r1.396 --- Changes 31 Oct 2005 03:57:57 -0000 1.395 +++ Changes 1 Nov 2005 09:58:37 -0000 1.396 @@ -2,6 +2,9 @@ 0.27_04 + - Add an invoked_action() method to return the name of the original + action invoked by the user. + - Add 'meta-spec' field to the generated META.yml file, including the version of the specification followed by the current Module::Build and the url where the specification can be found. |
From: Randy W. S. <si...@us...> - 2005-11-01 09:34:29
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11739/lib/Module/Build Modified Files: Base.pm Log Message: Make sure "invoked_action" gets initialised correctly at the appropriate times. Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.510 retrieving revision 1.511 diff -u -d -r1.510 -r1.511 --- Base.pm 25 Oct 2005 21:18:13 -0000 1.510 +++ Base.pm 1 Nov 2005 09:34:22 -0000 1.511 @@ -22,7 +22,7 @@ sub new { my $self = shift()->_construct(@_); - $self->{action} = 'Build_PL'; + $self->{invoked_action} = $self->{action} ||= 'Build_PL'; $self->cull_args(@ARGV); die "Too early to specify a build action '$self->{action}'. Do 'Build $self->{action}' instead.\n" @@ -71,8 +71,7 @@ unless $mb_version eq $self->{properties}{mb_version}; $self->cull_args(@ARGV); - $self->{action} ||= 'build'; - $self->{invoked_action} = $self->{action}; + $self->{invoked_action} = $self->{action} ||= 'build'; return $self; } |
From: Randy W. S. <si...@us...> - 2005-11-01 08:04:42
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28158/t Modified Files: metadata.t Log Message: Add minimal tests to ensure that all required META.yml fields are present. Quiet noise in tests from construction of M::B objects. Index: metadata.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/metadata.t,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- metadata.t 20 Oct 2005 16:45:19 -0000 1.7 +++ metadata.t 1 Nov 2005 08:04:33 -0000 1.8 @@ -3,7 +3,7 @@ use lib 't/lib'; use strict; -use Test::More tests => 35; +use Test::More tests => 43; use File::Spec (); @@ -15,14 +15,21 @@ my $cwd = Cwd::cwd; my $tmp = File::Spec->catdir( $cwd, 't', '_tmp' ); + +use Module::Build; +my $has_YAML = Module::Build->current->feature('YAML_support'); + + use DistGen; my $dist = DistGen->new( dir => $tmp ); $dist->change_file( 'Build.PL', <<"---" ); use Module::Build; my \$builder = Module::Build->new( - module_name => '@{[$dist->name]}', - dist_version => '3.14159265', - license => 'perl', + module_name => '@{[$dist->name]}', + dist_version => '3.14159265', + dist_author => [ 'Simple Simon <ss\@somewhere.priv>' ], + dist_abstract => 'Something interesting', + license => 'perl', ); \$builder->create_build_script(); @@ -33,8 +40,46 @@ use Module::Build; my $mb = Module::Build->new_from_context; + +################################################## +# +# Test for valid META.yml + +SKIP: { + skip( 'YAML_support feature is not enabled', 8 ) unless $has_YAML; + + require YAML; + my $node = YAML::Node->new({}); + $node = $mb->prepare_metadata( $node ); + + # exists() doesn't seem to work here + ok defined( $node->{name} ), "'name' field present in META.yml"; + ok defined( $node->{version} ), "'version' field present in META.yml"; + ok defined( $node->{abstract} ), "'abstract' field present in META.yml"; + ok defined( $node->{author} ), "'author' field present in META.yml"; + ok defined( $node->{license} ), "'license' field present in META.yml"; + ok defined( $node->{generated_by} ), + "'generated_by' field present in META.yml"; + ok defined( $node->{'meta-spec'}{version} ), + "'meta-spec' -> 'version' field present in META.yml"; + ok defined( $node->{'meta-spec'}{url} ), + "'meta-spec' -> 'url' field present in META.yml"; + + # TODO : find a way to test for failure when above fields are not present +} + +$dist->clean; + + +################################################## +# +# Tests to ensure that the correct packages and versions are +# recorded for the 'provides' field of META.yml + my $provides; # Used a bunch of times below +sub new_build { return Module::Build->new_from_context( quiet => 1, @_ ) } + ############################## Single Module # File with corresponding package (w/ or w/o version) @@ -45,7 +90,7 @@ $VERSION = '1.23'; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context; +$mb = new_build; is_deeply($mb->find_dist_packages, {'Simple' => {file => 'lib/Simple.pm', version => '1.23'}}); @@ -54,7 +99,7 @@ package Simple; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context; +$mb = new_build; is_deeply($mb->find_dist_packages, {'Simple' => {file => 'lib/Simple.pm'}}); @@ -66,7 +111,7 @@ $VERSION = '1.23'; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context; +$mb = new_build; is_deeply($mb->find_dist_packages, {'Foo::Bar' => { file => 'lib/Simple.pm', version => '1.23' }}); @@ -75,7 +120,7 @@ package Foo::Bar; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context; +$mb = new_build; is_deeply($mb->find_dist_packages, {'Foo::Bar' => { file => 'lib/Simple.pm'}}); @@ -91,7 +136,7 @@ $VERSION = '1.23'; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context; +$mb = new_build; is_deeply($mb->find_dist_packages, {'Simple' => { file => 'lib/Simple.pm', version => '1.23' }, @@ -110,7 +155,7 @@ $VERSION = '1.23'; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context; +$mb = new_build; is_deeply($mb->find_dist_packages, {'Foo' => { file => 'lib/Simple.pm', version => '1.23' }, @@ -128,7 +173,7 @@ package Simple; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context; +$mb = new_build; is_deeply($mb->find_dist_packages, {'Simple' => { file => 'lib/Simple.pm' }}); @@ -144,7 +189,7 @@ package Simple; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context; +$mb = new_build; is_deeply($mb->find_dist_packages, {'Simple' => { file => 'lib/Simple.pm', version => '1.23' }}); @@ -161,7 +206,7 @@ $VERSION = '1.23'; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context; +$mb = new_build; is_deeply($mb->find_dist_packages, {'Simple' => { file => 'lib/Simple.pm', version => '1.23' }}); @@ -179,7 +224,7 @@ --- $dist->regen( clean => 1 ); my $err = ''; -$err = stderr_of( sub { $mb = Module::Build->new_from_context } ); +$err = stderr_of( sub { $mb = new_build } ); $err = stderr_of( sub { $provides = $mb->find_dist_packages } ); is_deeply($provides, {'Simple' => { file => 'lib/Simple.pm', @@ -198,7 +243,7 @@ $VERSION = '2.34'; --- $dist->regen( clean => 1 ); -$err = stderr_of( sub { $mb = Module::Build->new_from_context } ); +$err = stderr_of( sub { $mb = new_build } ); $err = stderr_of( sub { $provides = $mb->find_dist_packages } ); is_deeply($provides, {'Foo' => { file => 'lib/Simple.pm', @@ -220,7 +265,7 @@ package Simple; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context; +$mb = new_build; is_deeply($mb->find_dist_packages, {'Simple' => { file => 'lib/Simple.pm' }}); $dist->remove_file( 'lib/Simple2.pm' ); @@ -238,7 +283,7 @@ package Simple; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context; +$mb = new_build; is_deeply($mb->find_dist_packages, {'Simple' => { file => 'lib/Simple.pm', version => '1.23' }}); @@ -258,7 +303,7 @@ $VERSION = '1.23'; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context; +$mb = new_build; is_deeply($mb->find_dist_packages, {'Simple' => { file => 'lib/Simple2.pm', version => '1.23' }}); @@ -278,7 +323,7 @@ $VERSION = '2.34'; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context; +$mb = new_build; $err = stderr_of( sub { $provides = $mb->find_dist_packages } ); is_deeply($provides, {'Simple' => { file => 'lib/Simple.pm', @@ -301,7 +346,7 @@ $VERSION = '1.23'; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context; +$mb = new_build; $err = stderr_of( sub { $provides = $mb->find_dist_packages } ); is_deeply($provides, {'Simple' => { file => 'lib/Simple.pm', @@ -325,7 +370,7 @@ package Foo; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context; +$mb = new_build; $provides = $mb->find_dist_packages; ok( exists( $provides->{Foo} ) ); # it exist, can't predict which file $dist->remove_file( 'lib/Simple2.pm' ); @@ -343,7 +388,7 @@ package Foo; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context; +$mb = new_build; is_deeply($mb->find_dist_packages, {'Foo' => { file => 'lib/Simple.pm', version => '1.23' }}); @@ -362,7 +407,7 @@ $VERSION = '1.23'; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context; +$mb = new_build; is_deeply($mb->find_dist_packages, {'Foo' => { file => 'lib/Simple2.pm', version => '1.23' }}); @@ -382,7 +427,7 @@ $VERSION = '2.34'; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context; +$mb = new_build; $err = stderr_of( sub { $provides = $mb->find_dist_packages } ); # XXX Should 'Foo' exist ??? Can't predict values for file & version ok( exists( $provides->{Foo} ) ); @@ -404,7 +449,7 @@ $VERSION = '1.23'; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context; +$mb = new_build; $err = stderr_of( sub { $provides = $mb->find_dist_packages } ); ok( exists( $provides->{Foo} ) ); is( $provides->{Foo}{version}, '1.23' ); @@ -430,7 +475,7 @@ --- $dist->regen( clean => 1 ); $err = stderr_of( sub { - $mb = Module::Build->new_from_context; + $mb = new_build; } ); $err = stderr_of( sub { $provides = $mb->find_dist_packages } ); is_deeply($provides, @@ -456,7 +501,7 @@ --- $dist->regen( clean => 1 ); $err = stderr_of( sub { - $mb = Module::Build->new_from_context; + $mb = new_build; } ); $err = stderr_of( sub { $provides = $mb->find_dist_packages } ); is_deeply($provides, @@ -482,7 +527,7 @@ $VERSION = '3.45'; --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context; +$mb = new_build; is_deeply($mb->find_dist_packages, {'Simple' => { file => 'lib/Simple.pm', version => '1.23' }}); @@ -495,7 +540,7 @@ $dist->change_file( 'lib/Simple.pm', '' ); $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context; +$mb = new_build; is_deeply( $mb->find_dist_packages, {} ); # Simple.pm => =pod..=cut (no package declaration) @@ -513,7 +558,7 @@ =cut --- $dist->regen( clean => 1 ); -$mb = Module::Build->new_from_context; +$mb = new_build; is_deeply($mb->find_dist_packages, {}); |
From: Ken W. <kwi...@us...> - 2005-10-31 03:58:07
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5065 Modified Files: Changes Log Message: Some little proofreadings of docs Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.394 retrieving revision 1.395 diff -u -d -r1.394 -r1.395 --- Changes 23 Oct 2005 04:38:33 -0000 1.394 +++ Changes 31 Oct 2005 03:57:57 -0000 1.395 @@ -6,10 +6,10 @@ version of the specification followed by the current Module::Build and the url where the specification can be found. - - Introduced two actions: html & manpages that will generate - documentation for POD when the respective feature is enabled. The + - Introduced two actions, 'html' & 'manpages', that generate + documentation for POD when the respective feature is enabled. The actions will generate the documents even if there is no set place - to install to. However, if the actions are invoked as a dependency + to install to. However, if the actions are invoked as a dependency of another action (e.g. build), the documentation will only be built when there is a default or user-specified place to install to. |
From: Ken W. <kwi...@us...> - 2005-10-31 03:58:07
|
Update of /cvsroot/module-build/Module-Build/lib/Module In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5065/lib/Module Modified Files: Build.pm Log Message: Some little proofreadings of docs Index: Build.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build.pm,v retrieving revision 1.190 retrieving revision 1.191 diff -u -d -r1.190 -r1.191 --- Build.pm 23 Oct 2005 02:18:15 -0000 1.190 +++ Build.pm 31 Oct 2005 03:57:59 -0000 1.191 @@ -307,8 +307,8 @@ =item docs -This will generate documentation (ie: Unix man pages and html -documents) for any binary and library files under B<blib/> that +This will generate documentation (e.g. Unix man pages and html +documents) for any installable items under B<blib/> that contain POD. If there are no C<bindoc> or C<libdoc> installation targets defined (as will be the case on systems that don't support Unix manpages) no action is taken for manpages. If there are no @@ -336,9 +336,9 @@ This will generate HTML documentation for any binary or library files under B<blib/> that contain POD. The HTML documentation will only be installed if the install paths can be determined from values in -C<Config.pm>. You can also supply or override install paths by -specifying there values on the command line with the C<binhtml> and -C<libhtml> installation targets. +C<Config.pm>. You can also supply or override install paths on the +command line by specifying C<install_path> values for the C<binhtml> +and/or C<libhtml> installation targets. =item install |
From: Randy W. S. <si...@us...> - 2005-10-25 21:18:21
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30704/lib/Module/Build Modified Files: Base.pm Log Message: Searching for the main POD document can fail when using 'dist_name' instead of 'module_name in construction. Added consitency to here-documents labels. Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.509 retrieving revision 1.510 diff -u -d -r1.509 -r1.510 --- Base.pm 25 Oct 2005 20:26:01 -0000 1.509 +++ Base.pm 25 Oct 2005 21:18:13 -0000 1.510 @@ -727,7 +727,10 @@ my ($self) = @_; my $p = $self->{properties}; if ($self->module_name) { - $p->{dist_version_from} ||= join( '/', 'lib', split '::', $self->module_name ) . '.pm'; + return $p->{dist_version_from} ||= + join( '/', 'lib', split(/::/, $self->module_name) ) . '.pm'; + } else { + return undef; } } @@ -941,12 +944,12 @@ } } - $self->log_warn(<<'ERRSTR'); + $self->log_warn(<<EOF); ERRORS/WARNINGS FOUND IN PREREQUISITES. You may wish to install the versions of the modules indicated above before proceeding with this installation -ERRSTR +EOF return 0; } else { @@ -2514,17 +2517,27 @@ my $parser = eval {require Pod::Readme; 1} ? Pod::Readme->new : eval {require Pod::Text; 1} ? Pod::Text->new : die "Can't load Pod::Readme or Pod::Text to create README"; - $self->log_info("Creating README using " . ref($parser) . "\n"); - $parser->parse_from_file($self->_main_docfile, 'README', @_); - $self->_add_to_manifest('MANIFEST', 'README'); + if ( my $docfile = $self->_main_docfile ) { + $self->log_info("Creating README using " . ref($parser) . "\n"); + $parser->parse_from_file($self->_main_docfile, 'README', @_); + $self->_add_to_manifest('MANIFEST', 'README'); + } else { + $self->log_warn(<<EOF); +Cannot create README; can't determine which file contains documentation; +Must supply either 'dist_version_from', or 'module_name' parameter. +EOF + } } sub _main_docfile { my $self = shift; $self->_find_dist_version_from; - my $pm_file = $self->dist_version_from; - (my $pod_file = $pm_file) =~ s/.pm$/.pod/; - return (-e $pod_file ? $pod_file : $pm_file); + if ( my $pm_file = $self->dist_version_from ) { + (my $pod_file = $pm_file) =~ s/.pm$/.pod/; + return (-e $pod_file ? $pod_file : $pm_file); + } else { + return undef; + } } sub ACTION_distdir { @@ -2751,7 +2764,7 @@ # XXX Add the meta_add & meta_merge stuff - print $fh <<"END_OF_META"; + print $fh <<"EOF"; --- #YAML:1.0 name: $p->{dist_name} version: $p->{dist_version} @@ -2760,7 +2773,7 @@ abstract: @{[ $self->dist_abstract ]} license: $p->{license} generated_by: Module::Build version $Module::Build::VERSION, without YAML.pm -END_OF_META +EOF } sub ACTION_distmeta { @@ -2816,10 +2829,12 @@ $self->{wrote_metadata} = $yaml_sub->($metafile, $node ); } else { - $self->log_warn(<<EOM); -\nCouldn't load YAML.pm, generating a minimal META.yml without it. -Please check and edit the generated metadata, or consider installing YAML.pm.\n -EOM + $self->log_warn(<<EOF); + +Couldn't load YAML.pm, generating a minimal META.yml without it. +Please check and edit the generated metadata, or consider installing YAML.pm. + +EOF $self->_write_minimal_metadata; } |
From: Randy W. S. <si...@us...> - 2005-10-25 20:26:16
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17188/lib/Module/Build Modified Files: Base.pm Log Message: Fix accursed test to check for $node->{$name} rather than $node->{name}; check that it is both defined and non-empty; and make the failure message look like an error. Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.508 retrieving revision 1.509 diff -u -d -r1.508 -r1.509 --- Base.pm 24 Oct 2005 15:45:19 -0000 1.508 +++ Base.pm 25 Oct 2005 20:26:01 -0000 1.509 @@ -2834,8 +2834,10 @@ foreach (qw(dist_name dist_version dist_author dist_abstract license)) { (my $name = $_) =~ s/^dist_//; $node->{$name} = $self->$_(); - die "Missing required field '$name' for META.yml\n" unless length($node->{name}); + die "ERROR: Missing required field '$name' for META.yml\n" + unless defined($node->{$name}) && length($node->{$name}); } + if (defined( $self->license ) && defined( my $url = $self->valid_licenses->{ $self->license } )) { $node->{resources}{license} = $url; |
From: Ken W. <kwi...@us...> - 2005-10-24 15:45:26
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28647 Modified Files: Base.pm Log Message: Add this check back in with the proper condition, since the META.yml spec we're trying to adhere to actually does require these fields. Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.507 retrieving revision 1.508 diff -u -d -r1.507 -r1.508 --- Base.pm 24 Oct 2005 02:58:07 -0000 1.507 +++ Base.pm 24 Oct 2005 15:45:19 -0000 1.508 @@ -2834,6 +2834,7 @@ foreach (qw(dist_name dist_version dist_author dist_abstract license)) { (my $name = $_) =~ s/^dist_//; $node->{$name} = $self->$_(); + die "Missing required field '$name' for META.yml\n" unless length($node->{name}); } if (defined( $self->license ) && defined( my $url = $self->valid_licenses->{ $self->license } )) { |
From: Ken W. <kwi...@us...> - 2005-10-24 12:34:42
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7670/lib/Module/Build Modified Files: Compat.pm Log Message: Remove unused line Index: Compat.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Compat.pm,v retrieving revision 1.68 retrieving revision 1.69 diff -u -d -r1.68 -r1.69 --- Compat.pm 20 Sep 2005 02:16:39 -0000 1.68 +++ Compat.pm 24 Oct 2005 12:34:30 -0000 1.69 @@ -85,7 +85,6 @@ # Save this 'cause CPAN will chdir all over the place. my $cwd = Cwd::cwd(); - my $makefile = File::Spec->rel2abs($0); CPAN::Shell->install('Module::Build::Compat') or die " *** Cannot install without Module::Build. Exiting ...\n"; |
From: Ken W. <kwi...@us...> - 2005-10-24 03:45:37
|
Update of /cvsroot/module-build/Module-Build/website In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29360 Modified Files: META-spec.html META-spec.pod Log Message: More formatting changes Index: META-spec.html =================================================================== RCS file: /cvsroot/module-build/Module-Build/website/META-spec.html,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- META-spec.html 24 Aug 2005 02:53:56 -0000 1.10 +++ META-spec.html 24 Oct 2005 03:45:25 -0000 1.11 @@ -17,7 +17,6 @@ <li><a href="#description">DESCRIPTION</a></li> <li><a href="#format">FORMAT</a></li> <li><a href="#terminology">TERMINOLOGY</a></li> - <li><a href="#version_specifications">VERSION SPECIFICATIONS</a></li> <li><a href="#header">HEADER</a></li> <li><a href="#fields">FIELDS</a></li> <ul> @@ -50,6 +49,7 @@ <li><a href="#generated_by">generated_by</a></li> </ul> + <li><a href="#version_specifications">VERSION SPECIFICATIONS</a></li> <li><a href="#see_also">SEE ALSO</a></li> <li><a href="#history">HISTORY</a></li> </ul> @@ -117,7 +117,7 @@ <p><em>Note: The latest stable version of this specification can always be found at <a href="http://module-build.sourceforge.net/META-spec-current.html">http://module-build.sourceforge.net/META-spec-current.html</a>, and the latest development version (which may include things that -won't make it into the stable version can always be found at +won't make it into the stable version) can always be found at <a href="http://module-build.sourceforge.net/META-spec-blead.html">http://module-build.sourceforge.net/META-spec-blead.html</a>.</em></p> <p> </p> @@ -127,19 +127,25 @@ <a href="http://www.yaml.org/">http://www.yaml.org/</a>).</p> <p>See the following links to learn why we chose YAML instead of, say, XML or Data::Dumper:</p> -<ul> -<li></li> -Module::Build design plans -<p><a href="http://nntp.x.perl.org/group/perl.makemaker/406">http://nntp.x.perl.org/group/perl.makemaker/406</a></p> +<dl> +<dt><strong><a name="item_module_3a_3abuild_design_plans">Module::Build design plans</a></strong><br /> +</dt> +<dd> +<a href="http://nntp.x.perl.org/group/perl.makemaker/406">http://nntp.x.perl.org/group/perl.makemaker/406</a> +</dd> <p></p> -<li></li> -Not keen on YAML -<p><a href="http://nntp.x.perl.org/group/perl.module-authors/1353">http://nntp.x.perl.org/group/perl.module-authors/1353</a></p> +<dt><strong><a name="item_not_keen_on_yaml">Not keen on YAML</a></strong><br /> +</dt> +<dd> +<a href="http://nntp.x.perl.org/group/perl.module-authors/1353">http://nntp.x.perl.org/group/perl.module-authors/1353</a> +</dd> <p></p> -<li></li> -META Concerns -<p><a href="http://nntp.x.perl.org/group/perl.module-authors/1385">http://nntp.x.perl.org/group/perl.module-authors/1385</a></p> -<p></p></ul> +<dt><strong><a name="item_meta_concerns">META Concerns</a></strong><br /> +</dt> +<dd> +<a href="http://nntp.x.perl.org/group/perl.module-authors/1385">http://nntp.x.perl.org/group/perl.module-authors/1385</a> +</dd> +<p></p></dl> <p> </p> <hr /> @@ -151,7 +157,8 @@ This is the primary object described by the <em>META.yml</em> specification. In the context of this document it usually refers to a collection of modules, scripts, and/or documents that are distributed -for other developers to use. +together for other developers to use. Examples of distributions are +<code>Class-Container</code>, <code>libwww-perl</code>, or <code>DBI</code>. </dd> <p></p> <dt><strong><a name="item_module">module</a></strong><br /> @@ -160,36 +167,13 @@ This refers to a reusable library of code typically contained in a single file. Currently, we primarily talk of perl modules, but this specification should be open enough to apply to other languages as -well (ex. python, ruby). +well (ex. python, ruby). Examples of modules are <code>Class::Container</code>, +<code>LWP::Simple</code>, or <code>DBD::File</code>. </dd> <p></p></dl> <p> </p> <hr /> -<h1><a name="version_specifications">VERSION SPECIFICATIONS</a></h1> -<p>Some fields require a version specification (ex. <a href="#requires">requires</a>, -<a href="#recommends">recommends</a>, <a href="#build_requires">build_requires</a>, etc.). This section details the -version specications that are currently supported.</p> -<p>If a single version is listed, then that version is considered to be -the minimum version supported.</p> -<p>If 0 is given as the version number, then any version is supported.</p> -<p>Additionally, for more complicated requirements, the specification -supports a list of versions, each of which may be optionally preceeded -by a relational operator.</p> -<p>Supported operators include < (less than), <= (less than or -equal), > (greater than), >= (greater than or equal), == (equal), and != -(not equal).</p> -<p>If a list is given then it is evaluated from left to right so that any -specifications in the list that conflict with a previous specification -are overriden by the later.</p> -<p>Examples:</p> -<pre> - >= 1.2, != 1.5, < 2.0</pre> -<p>Any version from version 1.2 onward, except version 1.5, that also -preceeds version 2.0.</p> -<p> -</p> -<hr /> <h1><a name="header">HEADER</a></h1> <p>The first line of a <em>META.yml</em> file should be a valid YAML document header like <code>"--- #YAML:1.0"</code>.</p> @@ -279,7 +263,7 @@ <p>(Spec 1.0) [optional] {map} A YAML mapping indicating the Perl modules this distribution requires for proper operation. The keys are the module names, and the values are version specifications as described in -<a href="/Module/Build.html">the Module::Build manpage</a> for the ``requires'' parameter.</p> +<a href="#version_specifications">VERSION SPECIFICATIONS</a>.</p> <p> </p> <h2><a name="recommends">recommends</a></h2> @@ -288,11 +272,13 @@ recommends: Data::Dumper: 0 File::Find: 1.03</pre> -<p>(Spec 1.0) [optional] {map} A YAML mapping indicating the Perl modules this -distribution recommends for enhanced operation.</p> +<p>(Spec 1.0) [optional] {map} A YAML mapping indicating the Perl modules +this distribution recommends for enhanced operation. The keys are the +module names, and the values are version specifications as described +in <a href="#version_specifications">VERSION SPECIFICATIONS</a>.</p> <p><em>ALTERNATIVE: It may be desirable to present to the user which -features depend on which modules so they can make an informed -decision about which recommended modules to install.</em></p> +features depend on which modules so they can make an informed decision +about which recommended modules to install.</em></p> <p>Example:</p> <pre> optional_features: @@ -319,8 +305,10 @@ Data::Dumper: 0 File::Find: 1.03</pre> <p>(Spec 1.0) [optional] {map} A YAML mapping indicating the Perl modules -required for building and/or testing of this distribution. These -dependencies are not required after the module is installed.</p> +required for building and/or testing of this distribution. The keys +are the module names, and the values are version specifications as +described in <a href="#version_specifications">VERSION SPECIFICATIONS</a>. These dependencies are not +required after the module is installed.</p> <p> </p> <h2><a name="conflicts">conflicts</a></h2> @@ -331,7 +319,9 @@ File::Find: 1.03</pre> <p>(Spec 1.0) [optional] {map} A YAML mapping indicating the Perl modules that cannot be installed while this distribution is installed. This is a -pretty uncommon situation.</p> +pretty uncommon situation. The keys for <code>conflicts</code> are the module +names, and the values are version specifications as described in +<a href="#version_specifications">VERSION SPECIFICATIONS</a>.</p> <p> </p> <h2><a name="dynamic_config">dynamic_config</a></h2> @@ -342,7 +332,7 @@ or <em>Makefile.PL</em> (or similar) must be executed when building this distribution, or whether it can be built, tested and installed solely from consulting its -metadata file. The main reason to set this to a true value if that +metadata file. The main reason to set this to a true value is that your module performs some dynamic configuration (asking questions, sensing the environment, etc.) as part of its build/install process.</p> <p>Currently Module::Build doesn't actually do anything with this flag @@ -489,14 +479,37 @@ <p> </p> <hr /> +<h1><a name="version_specifications">VERSION SPECIFICATIONS</a></h1> +<p>Some fields require a version specification (ex. <a href="#requires">requires</a>, +<a href="#recommends">recommends</a>, <a href="#build_requires">build_requires</a>, etc.) to indicate the particular +version(s) of some other module that may be required as a +prerequisite. This section details the version specification formats +that are currently supported.</p> +<p>The simplest format for a version specification is just the version +number itself, e.g. <code>2.4</code>. This means that <strong>at least</strong> version 2.4 +must be present. To indicate that <strong>any</strong> version of a prerequisite is +okay, even if the prerequisite doesn't define a version at all, use +the version <code>0</code>.</p> +<p>You may also use the operators < (less than), <= (less than or +equal), > (greater than), >= (greater than or equal), == +(equal), and != (not equal). For example, the specification <code>< +2.0</code> means that any version of the prerequisite less than 2.0 is +suitable.</p> +<p>For more complicated situations, version specifications may be AND-ed +together using commas. The specification <code>>= 1.2, != 1.5, < +2.0</code> indicates a version that must be <strong>at least</strong> 1.2, <strong>less than</strong> +2.0, and <strong>not equal to</strong> 1.5.</p> +<p> +</p> +<hr /> <h1><a name="see_also">SEE ALSO</a></h1> <p>CPAN, <a href="http://www.cpan.org/">http://www.cpan.org/</a></p> <p>CPAN.pm, <a href="http://search.cpan.org/author/ANDK/CPAN/">http://search.cpan.org/author/ANDK/CPAN/</a></p> <p>CPANPLUS, <a href="http://search.cpan.org/author/KANE/CPANPLUS/">http://search.cpan.org/author/KANE/CPANPLUS/</a></p> <p>Data::Dumper, <a href="http://search.cpan.org/author/ILYAM/Data-Dumper/">http://search.cpan.org/author/ILYAM/Data-Dumper/</a></p> <p>ExtUtils::MakeMaker, <a href="http://search.cpan.org/author/MSCHWERN/ExtUtils-MakeMaker/">http://search.cpan.org/author/MSCHWERN/ExtUtils-MakeMaker/</a></p> -<p>Module::Build, <a href="http://search.cpan.org/author/KWILLIAMS/Module-Build/">http://search.cpan.org/author/KWILLIAMS/Module-Build/</a></p> -<p>Module::Install, <a href="http://search.cpan.org/author/KWILLIAMS/Module-Install/">http://search.cpan.org/author/KWILLIAMS/Module-Install/</a></p> +<p>Module::Build, <a href="http://search.cpan.org/~kwilliams/Module-Build/">http://search.cpan.org/~kwilliams/Module-Build/</a></p> +<p>Module::Install, <a href="http://search.cpan.org/~autrijus/Module-Install/">http://search.cpan.org/~autrijus/Module-Install/</a></p> <p>XML, <a href="http://www.w3.org/XML/">http://www.w3.org/XML/</a></p> <p>YAML, <a href="http://www.yaml.org/">http://www.yaml.org/</a></p> <p> Index: META-spec.pod =================================================================== RCS file: /cvsroot/module-build/Module-Build/website/META-spec.pod,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- META-spec.pod 24 Oct 2005 03:38:32 -0000 1.12 +++ META-spec.pod 24 Oct 2005 03:45:25 -0000 1.13 @@ -205,7 +205,7 @@ (Spec 1.0) [optional] {map} A YAML mapping indicating the Perl modules this distribution requires for proper operation. The keys are the module names, and the values are version specifications as described in -L<Module::Build> for the "requires" parameter. +L<VERSION SPECIFICATIONS>. =head2 recommends @@ -215,12 +215,16 @@ Data::Dumper: 0 File::Find: 1.03 -(Spec 1.0) [optional] {map} A YAML mapping indicating the Perl modules this -distribution recommends for enhanced operation. +(Spec 1.0) [optional] {map} A YAML mapping indicating the Perl modules +this distribution recommends for enhanced operation. The keys are the +module names, and the values are version specifications as described +in L<VERSION SPECIFICATIONS>. + + I<ALTERNATIVE: It may be desirable to present to the user which -features depend on which modules so they can make an informed -decision about which recommended modules to install.> +features depend on which modules so they can make an informed decision +about which recommended modules to install.> Example: @@ -250,8 +254,10 @@ File::Find: 1.03 (Spec 1.0) [optional] {map} A YAML mapping indicating the Perl modules -required for building and/or testing of this distribution. These -dependencies are not required after the module is installed. +required for building and/or testing of this distribution. The keys +are the module names, and the values are version specifications as +described in L<VERSION SPECIFICATIONS>. These dependencies are not +required after the module is installed. =head2 conflicts @@ -263,7 +269,10 @@ (Spec 1.0) [optional] {map} A YAML mapping indicating the Perl modules that cannot be installed while this distribution is installed. This is a -pretty uncommon situation. +pretty uncommon situation. The keys for C<conflicts> are the module +names, and the values are version specifications as described in +L<VERSION SPECIFICATIONS>. + =head2 dynamic_config @@ -275,7 +284,7 @@ or F<Makefile.PL> (or similar) must be executed when building this distribution, or whether it can be built, tested and installed solely from consulting its -metadata file. The main reason to set this to a true value if that +metadata file. The main reason to set this to a true value is that your module performs some dynamic configuration (asking questions, sensing the environment, etc.) as part of its build/install process. |
From: Ken W. <kwi...@us...> - 2005-10-24 03:38:40
|
Update of /cvsroot/module-build/Module-Build/website In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28530 Modified Files: META-spec.pod Log Message: Move the VERSION SPECIFICATIONS section to after the fields section. Index: META-spec.pod =================================================================== RCS file: /cvsroot/module-build/Module-Build/website/META-spec.pod,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- META-spec.pod 24 Oct 2005 03:35:10 -0000 1.11 +++ META-spec.pod 24 Oct 2005 03:38:32 -0000 1.12 @@ -107,31 +107,6 @@ =back -=head1 VERSION SPECIFICATIONS - -Some fields require a version specification (ex. L<"requires">, -L<"recommends">, L<"build_requires">, etc.) to indicate the particular -versionZ<>(s) of some other module that may be required as a -prerequisite. This section details the version specification formats -that are currently supported. - -The simplest format for a version specification is just the version -number itself, e.g. C<2.4>. This means that B<at least> version 2.4 -must be present. To indicate that B<any> version of a prerequisite is -okay, even if the prerequisite doesn't define a version at all, use -the version C<0>. - -You may also use the operators E<lt> (less than), E<lt>= (less than or -equal), E<gt> (greater than), E<gt>= (greater than or equal), == -(equal), and != (not equal). For example, the specification C<E<lt> -2.0> means that any version of the prerequisite less than 2.0 is -suitable. - -For more complicated situations, version specifications may be AND-ed -together using commas. The specification C<E<gt>= 1.2, != 1.5, E<lt> -2.0> indicates a version that must be B<at least> 1.2, B<less than> -2.0, and B<not equal to> 1.5. - =head1 HEADER The first line of a F<META.yml> file should be a valid YAML document @@ -454,6 +429,31 @@ tool that generated the file and the second field as version of that tool. RWS] +=head1 VERSION SPECIFICATIONS + +Some fields require a version specification (ex. L<"requires">, +L<"recommends">, L<"build_requires">, etc.) to indicate the particular +versionZ<>(s) of some other module that may be required as a +prerequisite. This section details the version specification formats +that are currently supported. + +The simplest format for a version specification is just the version +number itself, e.g. C<2.4>. This means that B<at least> version 2.4 +must be present. To indicate that B<any> version of a prerequisite is +okay, even if the prerequisite doesn't define a version at all, use +the version C<0>. + +You may also use the operators E<lt> (less than), E<lt>= (less than or +equal), E<gt> (greater than), E<gt>= (greater than or equal), == +(equal), and != (not equal). For example, the specification C<E<lt> +2.0> means that any version of the prerequisite less than 2.0 is +suitable. + +For more complicated situations, version specifications may be AND-ed +together using commas. The specification C<E<gt>= 1.2, != 1.5, E<lt> +2.0> indicates a version that must be B<at least> 1.2, B<less than> +2.0, and B<not equal to> 1.5. + =head1 SEE ALSO CPAN, L<http://www.cpan.org/> |
From: Ken W. <kwi...@us...> - 2005-10-24 03:35:17
|
Update of /cvsroot/module-build/Module-Build/website In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27887 Modified Files: META-spec.pod Log Message: Fix formatting Index: META-spec.pod =================================================================== RCS file: /cvsroot/module-build/Module-Build/website/META-spec.pod,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- META-spec.pod 24 Oct 2005 03:31:56 -0000 1.10 +++ META-spec.pod 24 Oct 2005 03:35:10 -0000 1.11 @@ -111,13 +111,13 @@ Some fields require a version specification (ex. L<"requires">, L<"recommends">, L<"build_requires">, etc.) to indicate the particular -version(s) of some other module that may be required as a +versionZ<>(s) of some other module that may be required as a prerequisite. This section details the version specification formats that are currently supported. The simplest format for a version specification is just the version -number itself, e.g. C<2.4>. This means that C<at least> version 2.4 -must be present. To indicate that C<any> version of a prerequisite is +number itself, e.g. C<2.4>. This means that B<at least> version 2.4 +must be present. To indicate that B<any> version of a prerequisite is okay, even if the prerequisite doesn't define a version at all, use the version C<0>. |
From: Ken W. <kwi...@us...> - 2005-10-24 03:32:05
|
Update of /cvsroot/module-build/Module-Build/website In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27458/website Modified Files: META-spec.pod Log Message: Change some formatting and do a rewrite of the VERSION section, using some text from the M::B docs Index: META-spec.pod =================================================================== RCS file: /cvsroot/module-build/Module-Build/website/META-spec.pod,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- META-spec.pod 24 Oct 2005 03:08:22 -0000 1.9 +++ META-spec.pod 24 Oct 2005 03:31:56 -0000 1.10 @@ -58,7 +58,7 @@ I<Note: The latest stable version of this specification can always be found at L<http://module-build.sourceforge.net/META-spec-current.html>, and the latest development version (which may include things that -won't make it into the stable version can always be found at +won't make it into the stable version) can always be found at L<http://module-build.sourceforge.net/META-spec-blead.html>.> =head1 FORMAT @@ -71,21 +71,15 @@ =over 4 -=item * - -Module::Build design plans +=item Module::Build design plans L<http://nntp.x.perl.org/group/perl.makemaker/406> -=item * - -Not keen on YAML +=item Not keen on YAML L<http://nntp.x.perl.org/group/perl.module-authors/1353> -=item * - -META Concerns +=item META Concerns L<http://nntp.x.perl.org/group/perl.module-authors/1385> @@ -100,46 +94,43 @@ This is the primary object described by the F<META.yml> specification. In the context of this document it usually refers to a collection of modules, scripts, and/or documents that are distributed -for other developers to use. +together for other developers to use. Examples of distributions are +C<Class-Container>, C<libwww-perl>, or C<DBI>. =item module This refers to a reusable library of code typically contained in a single file. Currently, we primarily talk of perl modules, but this specification should be open enough to apply to other languages as -well (ex. python, ruby). +well (ex. python, ruby). Examples of modules are C<Class::Container>, +C<LWP::Simple>, or C<DBD::File>. =back =head1 VERSION SPECIFICATIONS Some fields require a version specification (ex. L<"requires">, -L<"recommends">, L<"build_requires">, etc.). This section details the -version specications that are currently supported. - -If a single version is listed, then that version is considered to be -the minimum version supported. - -If 0 is given as the version number, then any version is supported. - -Additionally, for more complicated requirements, the specification -supports a list of versions, each of which may be optionally preceeded -by a relational operator. - -Supported operators include E<lt> (less than), E<lt>= (less than or -equal), E<gt> (greater than), E<gt>= (greater than or equal), == (equal), and != -(not equal). - -If a list is given then it is evaluated from left to right so that any -specifications in the list that conflict with a previous specification -are overriden by the later. +L<"recommends">, L<"build_requires">, etc.) to indicate the particular +version(s) of some other module that may be required as a +prerequisite. This section details the version specification formats +that are currently supported. -Examples: +The simplest format for a version specification is just the version +number itself, e.g. C<2.4>. This means that C<at least> version 2.4 +must be present. To indicate that C<any> version of a prerequisite is +okay, even if the prerequisite doesn't define a version at all, use +the version C<0>. - >= 1.2, != 1.5, < 2.0 +You may also use the operators E<lt> (less than), E<lt>= (less than or +equal), E<gt> (greater than), E<gt>= (greater than or equal), == +(equal), and != (not equal). For example, the specification C<E<lt> +2.0> means that any version of the prerequisite less than 2.0 is +suitable. -Any version from version 1.2 onward, except version 1.5, that also -preceeds version 2.0. +For more complicated situations, version specifications may be AND-ed +together using commas. The specification C<E<gt>= 1.2, != 1.5, E<lt> +2.0> indicates a version that must be B<at least> 1.2, B<less than> +2.0, and B<not equal to> 1.5. =head1 HEADER |
From: Ken W. <kwi...@us...> - 2005-10-24 03:08:32
|
Update of /cvsroot/module-build/Module-Build/website In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23149/website Modified Files: META-spec.pod Log Message: Fix the URL for Module::Install Index: META-spec.pod =================================================================== RCS file: /cvsroot/module-build/Module-Build/website/META-spec.pod,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- META-spec.pod 24 Aug 2005 02:53:33 -0000 1.8 +++ META-spec.pod 24 Oct 2005 03:08:22 -0000 1.9 @@ -475,9 +475,9 @@ ExtUtils::MakeMaker, L<http://search.cpan.org/author/MSCHWERN/ExtUtils-MakeMaker/> -Module::Build, L<http://search.cpan.org/author/KWILLIAMS/Module-Build/> +Module::Build, L<http://search.cpan.org/~kwilliams/Module-Build/> -Module::Install, L<http://search.cpan.org/author/KWILLIAMS/Module-Install/> +Module::Install, L<http://search.cpan.org/~autrijus/Module-Install/> XML, L<http://www.w3.org/XML/> |
From: Ken W. <kwi...@us...> - 2005-10-24 02:58:16
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20272/lib/Module/Build Modified Files: Base.pm Log Message: This check wasn't doing anything, and I'm not sure these fields should all be required Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.506 retrieving revision 1.507 diff -u -d -r1.506 -r1.507 --- Base.pm 23 Oct 2005 04:38:34 -0000 1.506 +++ Base.pm 24 Oct 2005 02:58:07 -0000 1.507 @@ -2833,7 +2833,6 @@ foreach (qw(dist_name dist_version dist_author dist_abstract license)) { (my $name = $_) =~ s/^dist_//; - die "Missing required field '$name' for META.yml\n" unless length($name); $node->{$name} = $self->$_(); } if (defined( $self->license ) && |
From: Randy W. S. <si...@us...> - 2005-10-23 04:38:48
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30455 Modified Files: Changes Log Message: Add meta-spec field to the generated META.yml. Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.393 retrieving revision 1.394 diff -u -d -r1.393 -r1.394 --- Changes 23 Oct 2005 02:18:15 -0000 1.393 +++ Changes 23 Oct 2005 04:38:33 -0000 1.394 @@ -2,6 +2,10 @@ 0.27_04 + - Add 'meta-spec' field to the generated META.yml file, including the + version of the specification followed by the current Module::Build + and the url where the specification can be found. + - Introduced two actions: html & manpages that will generate documentation for POD when the respective feature is enabled. The actions will generate the documents even if there is no set place |
From: Randy W. S. <si...@us...> - 2005-10-23 04:38:48
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30455/lib/Module/Build Modified Files: Base.pm Log Message: Add meta-spec field to the generated META.yml. Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.505 retrieving revision 1.506 diff -u -d -r1.505 -r1.506 --- Base.pm 23 Oct 2005 03:37:38 -0000 1.505 +++ Base.pm 23 Oct 2005 04:38:34 -0000 1.506 @@ -2833,6 +2833,7 @@ foreach (qw(dist_name dist_version dist_author dist_abstract license)) { (my $name = $_) =~ s/^dist_//; + die "Missing required field '$name' for META.yml\n" unless length($name); $node->{$name} = $self->$_(); } if (defined( $self->license ) && @@ -2857,6 +2858,12 @@ $node->{generated_by} = "Module::Build version $Module::Build::VERSION"; + $node->{'meta-spec'} = { + version => '1.2', + url => 'http://module-build.sourceforge.net/META-spec-v1.2.html', + }; + + while (my($k, $v) = each %{$p->{meta_add}}) { $node->{$k} = $v; } |
From: Randy W. S. <si...@us...> - 2005-10-23 03:37:45
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21762/lib/Module/Build Modified Files: Base.pm Log Message: Actions html & manpages were quiting too early if no pod was found for "bin" files, without checking for "lib" files. Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.504 retrieving revision 1.505 diff -u -d -r1.504 -r1.505 --- Base.pm 23 Oct 2005 03:06:01 -0000 1.504 +++ Base.pm 23 Oct 2005 03:37:38 -0000 1.505 @@ -2087,8 +2087,7 @@ foreach my $type ( qw(bin lib) ) { my $files = $self->_find_pods( $self->{properties}{"${type}doc_dirs"}, exclude => [ qr/\.bat$/ ] ); - return if !%$files || - (%$files && !$self->install_destination("${type}doc")); + return if %$files && !$self->install_destination("${type}doc"); } } @@ -2177,8 +2176,7 @@ foreach my $type ( qw(bin lib) ) { my $files = $self->_find_pods( $self->{properties}{"${type}doc_dirs"}, exclude => [ qr/\.(?:bat|com|html)$/ ] ); - return if !%$files || - (%$files && !$self->install_destination("${type}html")); + return if %$files && !$self->install_destination("${type}html"); } } |
From: Randy W. S. <si...@us...> - 2005-10-23 03:06:09
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17681/lib/Module/Build Modified Files: Base.pm Log Message: Quit earlier in ACTION_manpages & ACTION_html if the respective features are disabled. Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.503 retrieving revision 1.504 diff -u -d -r1.503 -r1.504 --- Base.pm 23 Oct 2005 02:18:15 -0000 1.503 +++ Base.pm 23 Oct 2005 03:06:01 -0000 1.504 @@ -2081,6 +2081,8 @@ sub ACTION_manpages { my $self = shift; + return unless $self->_mb_feature('manpage_support'); + if ( $self->invoked_action ne 'manpages' ) { foreach my $type ( qw(bin lib) ) { my $files = $self->_find_pods( $self->{properties}{"${type}doc_dirs"}, @@ -2093,10 +2095,8 @@ $self->depends_on('code'); - if ( $self->_mb_feature('manpage_support') ) { - $self->manify_bin_pods; - $self->manify_lib_pods; - } + $self->manify_bin_pods; + $self->manify_lib_pods; } sub manify_bin_pods { @@ -2171,6 +2171,8 @@ sub ACTION_html { my $self = shift; + return unless $self->_mb_feature('HTML_support'); + if ( $self->invoked_action ne 'html' ) { foreach my $type ( qw(bin lib) ) { my $files = $self->_find_pods( $self->{properties}{"${type}doc_dirs"}, @@ -2182,7 +2184,7 @@ $self->depends_on('code'); - $self->htmlify_pods if $self->_mb_feature('HTML_support'); + $self->htmlify_pods; } @@ -3156,7 +3158,7 @@ my $localdir = File::Spec->catdir( $blib, $type ); next unless -e $localdir; - if (my $dest = $self->install_destination($type) ) { + if (my $dest = $self->install_destination($type)) { $map{$localdir} = $dest; } else { # Platforms like Win32, MacOS, etc. may not build man pages & |
From: Randy W. S. <si...@us...> - 2005-10-23 02:18:35
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8898/lib/Module/Build Modified Files: Base.pm Log Message: Removed the gen_manpages, gen_html, install_manpages, install_html properties that were a failed attempt to provide user control of generation of documentation in favor of method introduced below. Introduced two actions: html & manpages that will generate documentation for POD when the respective feature is enabled. The actions will generate the documents even if there is no set place to install to. However, if the actions are invoked as a dependency of another action (e.g. build), the documentation will only be built when there is a default place to install to. Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.502 retrieving revision 1.503 diff -u -d -r1.502 -r1.503 --- Base.pm 20 Oct 2005 16:45:19 -0000 1.502 +++ Base.pm 23 Oct 2005 02:18:15 -0000 1.503 @@ -72,6 +72,7 @@ $self->cull_args(@ARGV); $self->{action} ||= 'build'; + $self->{invoked_action} = $self->{action}; return $self; } @@ -283,17 +284,6 @@ }, }; - - my $installdirs = $p->{installdirs}; - - $p->{gen_manpages} ||= ( $p->{install_sets}{$installdirs}{bindoc} && - $p->{install_sets}{$installdirs}{libdoc} ) ? 1 : 0; - $p->{gen_html} ||= ( $p->{install_sets}{$installdirs}{binhtml} && - $p->{install_sets}{$installdirs}{libhtml} ) ? 1 : 0; - - $p->{install_manpages} ||= $p->{gen_manpages} ? 1 : 0; - $p->{install_html} ||= $p->{gen_html} ? 1 : 0; - } sub _find_nested_builds { @@ -398,6 +388,7 @@ } sub current_action { shift->{action} } +sub invoked_action { shift->{invoked_action} } sub notes { shift()->{phash}{notes}->access(@_) } sub config_data { shift()->{phash}{config_data}->access(@_) } @@ -581,12 +572,6 @@ __PACKAGE__->add_property(metafile => 'META.yml'); __PACKAGE__->add_property(use_rcfile => 1); -__PACKAGE__->add_property($_ => 0) for qw( - gen_manpages - gen_html - install_manpages - install_html -); __PACKAGE__->add_property($_) for qw( base_dir dist_name @@ -1227,7 +1212,8 @@ if (@_) { my ($action, %p) = @_; my $args = $p{args} ? delete($p{args}) : {}; - + + local $self->{invoked_action} = $action; local $self->{args} = {%{$self->{args}}, %$args}; local $self->{properties} = {%{$self->{properties}}, %p}; return $self->_call_action($action); @@ -1348,10 +1334,6 @@ html_css meta_add meta_merge - gen_manpages - gen_html - install_manpages - install_html test_files install_base create_makefile_pl @@ -1388,10 +1370,6 @@ $opt = $self->_translate_option($opt); my @bool_opts = qw( - gen_manpages - gen_html - install_manpages - install_html verbose create_readme pollute @@ -2097,15 +2075,28 @@ my $self = shift; $self->depends_on('code'); + $self->depends_on('manpages', 'html'); +} - if ( $self->_mb_feature('manpage_support') && - $self->gen_manpages ) - { +sub ACTION_manpages { + my $self = shift; + + if ( $self->invoked_action ne 'manpages' ) { + foreach my $type ( qw(bin lib) ) { + my $files = $self->_find_pods( $self->{properties}{"${type}doc_dirs"}, + exclude => [ qr/\.bat$/ ] ); + return if !%$files || + (%$files && !$self->install_destination("${type}doc")); + + } + } + + $self->depends_on('code'); + + if ( $self->_mb_feature('manpage_support') ) { $self->manify_bin_pods; $self->manify_lib_pods; } - - $self->htmlify_pods if $self->gen_html; } sub manify_bin_pods { @@ -2179,10 +2170,22 @@ sub ACTION_html { my $self = shift; + + if ( $self->invoked_action ne 'html' ) { + foreach my $type ( qw(bin lib) ) { + my $files = $self->_find_pods( $self->{properties}{"${type}doc_dirs"}, + exclude => [ qr/\.(?:bat|com|html)$/ ] ); + return if !%$files || + (%$files && !$self->install_destination("${type}html")); + } + } + $self->depends_on('code'); - $self->htmlify_pods; + + $self->htmlify_pods if $self->_mb_feature('HTML_support'); } + # XXX This is wrong, wrong, wrong. # 1) It assumes installation into site directories # 2) If it's an ActiveState perl install, we need to run @@ -3141,17 +3144,6 @@ sub install_types { my $self = shift; my %types = (%{$self->install_path}, %{ $self->install_sets->{$self->installdirs} }); - - unless ( $self->gen_html && $self->install_html ) { - delete( $types{binhtml} ); - delete( $types{libhtml} ); - } - - unless ( $self->gen_manpages && $self->install_manpages ) { - delete( $types{bindoc} ); - delete( $types{libdoc} ); - } - return sort keys %types; } @@ -3164,12 +3156,13 @@ my $localdir = File::Spec->catdir( $blib, $type ); next unless -e $localdir; - if (my $dest = $self->install_destination($type)) { + if (my $dest = $self->install_destination($type) ) { $map{$localdir} = $dest; } else { - # Platforms like Win32, MacOS, etc. may not build man pages + # Platforms like Win32, MacOS, etc. may not build man pages & + # Many platforms don't supply default locations for html docs die "Can't figure out where to install things of type '$type'" - unless $type =~ /^(lib|bin)doc$/; + unless $type =~ /^(lib|bin)(doc|html)$/; } } |
From: Randy W. S. <si...@us...> - 2005-10-23 02:18:35
|
Update of /cvsroot/module-build/Module-Build/lib/Module In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8898/lib/Module Modified Files: Build.pm Log Message: Removed the gen_manpages, gen_html, install_manpages, install_html properties that were a failed attempt to provide user control of generation of documentation in favor of method introduced below. Introduced two actions: html & manpages that will generate documentation for POD when the respective feature is enabled. The actions will generate the documents even if there is no set place to install to. However, if the actions are invoked as a dependency of another action (e.g. build), the documentation will only be built when there is a default place to install to. Index: Build.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build.pm,v retrieving revision 1.189 retrieving revision 1.190 diff -u -d -r1.189 -r1.190 --- Build.pm 20 Oct 2005 16:45:19 -0000 1.189 +++ Build.pm 23 Oct 2005 02:18:15 -0000 1.190 @@ -94,6 +94,7 @@ sub os_type { $OSTYPES{$^O} } 1; + __END__ @@ -330,12 +331,21 @@ test>), the 'help' action will show you any POD documentation it can find for that action. +=item html + +This will generate HTML documentation for any binary or library files +under B<blib/> that contain POD. The HTML documentation will only be +installed if the install paths can be determined from values in +C<Config.pm>. You can also supply or override install paths by +specifying there values on the command line with the C<binhtml> and +C<libhtml> installation targets. + =item install This action will use C<ExtUtils::Install> to install the files from -C<blib/> into the system. See L<How Installation Paths are Determined> for details -about how Module::Build determines where to install things, and how to -influence this process. +C<blib/> into the system. See L<How Installation Paths are Determined> +for details about how Module::Build determines where to install +things, and how to influence this process. If you want the installation process to look around in C<@INC> for other versions of the stuff you're installing and try to delete it, @@ -373,6 +383,15 @@ See the L<distcheck> and L<skipcheck> actions if you want to find out what the C<manifest> action would do, without actually doing anything. +=item manpages + +This will generate man pages for any binary or library files under +B<blib/> that contain POD. The man pages will only be installed if the +install paths can be determined from values in C<Config.pm>. You can +also supply or override install paths by specifying there values on +the command line with the C<bindoc> and C<libdoc> installation +targets. + =item ppd Build a PPD file for your distribution. |