module-build-checkins Mailing List for Module::Build (Page 15)
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: Ken W. <kwi...@us...> - 2005-10-11 00:06:42
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6469 Modified Files: MANIFEST MANIFEST.SKIP Log Message: Didn't mean to include inc/* Index: MANIFEST =================================================================== RCS file: /cvsroot/module-build/Module-Build/MANIFEST,v retrieving revision 1.48 retrieving revision 1.49 diff -u -d -r1.48 -r1.49 --- MANIFEST 10 Oct 2005 15:23:08 -0000 1.48 +++ MANIFEST 11 Oct 2005 00:06:43 -0000 1.49 @@ -1,6 +1,5 @@ Build.PL Changes -inc/ModuleBuildBuilder.pm INSTALL lib/Module/Build.pm lib/Module/Build/Authoring.pod Index: MANIFEST.SKIP =================================================================== RCS file: /cvsroot/module-build/Module-Build/MANIFEST.SKIP,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- MANIFEST.SKIP 15 Apr 2005 23:28:47 -0000 1.19 +++ MANIFEST.SKIP 11 Oct 2005 00:06:44 -0000 1.20 @@ -1,4 +1,5 @@ ^_build +^inc ^kwiki (^|/)blib CVS |
|
From: Ken W. <kwi...@us...> - 2005-10-10 15:23:09
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13140 Modified Files: MANIFEST Log Message: Index: MANIFEST =================================================================== RCS file: /cvsroot/module-build/Module-Build/MANIFEST,v retrieving revision 1.47 retrieving revision 1.48 diff -u -d -r1.47 -r1.48 --- MANIFEST 15 Jul 2005 12:38:56 -0000 1.47 +++ MANIFEST 10 Oct 2005 15:23:08 -0000 1.48 @@ -44,6 +44,7 @@ t/lib/Test/Simple.pm t/manifypods.t t/metadata.t +t/metadata2.t t/moduleinfo.t t/notes.t t/parents.t |
|
From: Ken W. <kwi...@us...> - 2005-10-10 15:20:49
|
Update of /cvsroot/module-build/Module-Build/lib/Module In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12455/lib/Module Modified Files: Build.pm Log Message: Version bump Index: Build.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build.pm,v retrieving revision 1.186 retrieving revision 1.187 diff -u -d -r1.186 -r1.187 --- Build.pm 6 Sep 2005 02:57:11 -0000 1.186 +++ Build.pm 10 Oct 2005 15:20:36 -0000 1.187 @@ -15,7 +15,7 @@ use vars qw($VERSION @ISA); @ISA = qw(Module::Build::Base); -$VERSION = '0.27_02'; +$VERSION = '0.27_03'; $VERSION = eval $VERSION; # Okay, this is the brute-force method of finding out what kind of |
|
From: Ken W. <kwi...@us...> - 2005-10-10 15:20:49
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12455 Modified Files: Changes Log Message: Version bump Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.385 retrieving revision 1.386 diff -u -d -r1.385 -r1.386 --- Changes 10 Oct 2005 15:18:54 -0000 1.385 +++ Changes 10 Oct 2005 15:20:36 -0000 1.386 @@ -1,6 +1,6 @@ Revision history for Perl extension Module::Build. -0.27_03 +0.27_03 (Beta for 0.28) Mon Oct 10 11:19:23 EDT 2005 - We now use ExtUtils::CBuilder to do all compiling of C code (for example, when compiling XS modules). (This change actually @@ -1256,592 +1256,3 @@ - Added documentation for 'extra_linker_flags' parameter, and added a corresponding 'extra_compiler_flags' parameter. [original patch by Richard Clamp] - - - The pass-through Makefile created by Module::Build::Compat now - supports MakeMaker options like POLLUTE=1 and INC. We also just - warn & skip when we see any unknown MM parameters, rather than - dying. [Dave Rolsky] - - - Fixed an error about how @INC and $ENV{PERL5LIB} interact during - the testing of M::B itself. [jk <bil...@fa...>] - - - The pass-through Makefile doesn't include 'recommended' M::B - dependencies in the Makefile anymore, since they're not strictly - necessary. In particular, this makes installing M::B itself - easier. - - - A new 'create_makefile_pl' parameter lets you use - Module::Build::Compat during the 'distdir' (or 'dist') action to - automatically create a Makefile.PL for compatibility with - ExtUtils::MakeMaker. The parameter's value should be one of the - styles named in the Module::Build::Compat documentation. - - - When compiling C code, we now respect 'pollute' and 'inc' - parameters. (XXX - needs docs) [Dave Rolsky] - - - Made the creation of the "install map" more generic. (XXX - needs - documentation) - - - Fixed a problem in which add_to_cleanup() didn't note cleanup files - unless create_build_script() had been called already. [Dave Rolsky] - - - During 'Build dist', we no longer have to load each .pm file (via - Module::Info) to determine the $VERSION numbers inside. Instead, - we call our internal version_from_file() method, which is the same - thing MakeMaker and PAUSE and search.cpan.org do. Also fixes a - failure when Module::Info is installed in a nonstandard directory. - [reported by Teun Burgers] - - - Fixed some failing test code on Windows - open files can't be - deleted. [Andrew Savige] - - - The Cygwin platform is now treated as a flavor of Unix rather than - a flavor of Windows. [chocolateboy] - - - We're now more aggressive about adding temporary C compilation - files (*.c, *.bs) to the cleanup list. [Dave Rolsky] - - - When constructing the list in META.yml of packages provided by this - distribution, we now use the same rules as the PAUSE scanner does - when a single .pm file contains multiple VERSIONs. [Andreas Koenig] - - - check_installed_status() now works as both a class method and an - object method (and is documented so). [Spotted by Dave Rolsky] - -0.18 Tue Apr 8 13:24:23 CDT 2003 - - - We now rewrite the shebang lines of scripts ourselves, rather than - relying on MakeMaker routines to do it. MakeMaker changed the way - this happened (not the result, but where the code lived) a few - times. [Suggested by Richard Clamp] - - - The scripts() method has changed to script_files(), and likewise - the 'scripts' parameter has changed to 'script_files'. The old - names can still be used for backward compatibility. - - - Support for the 'scripts' parameter (which is now 'script_files') - was broken in 0.17, now it's fixed. [Richard Clamp] - - - We now recommend ExtUtils::ParseXS 2.02, which will fail to load - with perl 5.005 or earlier (which is proper, because it doesn't - work with those versions). When it fails to load, we still fall - back to using the xsubpp script for XS parsing. [spotted by Dave - Rolsky, fix suggested by Richard Clamp] - - - Now works on VMS - the Build script's shebang-line-equivalent - wasn't being formed correctly there - though just about everything - else worked fine. [Tested & patched by Michael Schwern] - - - Eliminated a warning that occurred if 'perl Build.PL' or the - check_installed_status() method was run with -w. [Spotted by - Michael Schwern] - -0.17 Sat Mar 29 18:06:01 CST 2003 - - - Now works under perl 5.005_03. [Richard Clamp] - - - When building blib/ , .PL files are now processed before doing - anything else. This means .PL files can be used in any of the - other contexts. - - - The locating and processing of .pm, .pod, .xs, .PL files and script - files are now isolated into their own methods. This is aimed - toward providing a stable interface for this stuff, so they can be - overridden, parameterized, etc. They're not quite stable yet, - though. - - - The internal lib_to_blib() method has gone away, because processing - is now done by smaller specialized methods. This method had some - duplicate assumptions about filenames that it's nice to get rid of. - - - .PL files are no longer automatically processed in the c_source - directory, they must be specified manually in a 'PL_files' - parameter. - - - Mention in the docs that it's useful to do "PL_FILES => {}" in a - Makefile.PL if you're using both a Makefile.PL and a - Build.PL. [Dom] - - - Add several options to the 'license' field, so that we're in better - sync with PAUSE and CPAN options. [Andreas Koenig] - - - Created a find_perl_interpreter() method that tries to locate the - currently executing perl interpreter. Following a suggestion from - Nicholas Clark <ni...@cc...> for Inline, we prefer an absolute - path in $^X, then an existent path in $Config{perlpath}, then - whatever's in $^X. - - - Use the aforementioned perl to run scripts in run_perl_script(). - This fixes the spurious warning "WARNING: Configuration was - initially created with 'foo', but we are now using 'bar'" that - appeared a lot in version 0.16. - - -0.16 Mon Feb 24 13:06:47 CST 2003 - - - All three C compilers that perl supports on Windows environments - (MSVC, BCC, and GCC) are now supported by Module::Build. We now - reportedly pass all tests on Windows. [Randy W. Sims] - - - The test t/xs.t, which tests building of XS modules, will be - skipped if no C compiler is found. [suggested by Randy W. Sims] - - - The "install" action accepts new "destdir" [motivated by Michael - Schwern and Chip Salzenberg] and "uninst" parameters [by Dave - Rolsky]. The former prepends an arbitrary directory to all - installation paths (useful for package management), and the latter - will tell ExtUtils::Install to remove any differing files that are - "shadowing" the stuff you're installing from a different location, - just like MakeMaker's "make install UNINST=1" command will do. - - - Made changes to the generated Makefile in Module::Build::Compat - that much better support Windows platforms [after suggestions by - James Freeman] - - - Added experimental support for creating distribution SIGNATURE - files via Module::Signature. [Dave Rolsky] - - - Added experimental support for installing via the "only.pm" module, - which allows loading specific versions of modules. Since this - module is so new, the interface may still be changing. [Brian - Ingerson] - - - Added support for installing executable scripts, via the 'scripts' - parameter to new(), and the scripts() accessor method. - - - Fix an infinite loop that occurred when doing 'perl Build.PL - config="foo=bar"' - - - Fix up the formatting of the error message the user gets when - prereqs aren't satisfied. - -0.15 Fri Jan 17 15:00:24 CST 2003 - - - In link_c(), extra object files were mistakenly being treated as - output files, not input files, in the up-to-date check. Fixed. - - - In up_to_date(), don't make an unnecessary copy of the file lists - when they're specified as array references. - - - Split off the C compilation phase into its own method, - compile_support_files(), for easier subclassing. - - - Start a stub of a 'manifypods' action. - - - Compiler optimizations weren't being included in C compilation - statements. Fixed. - - - The 'extra_linker_flags' parameter wasn't being honored. Fixed. - - - The 'ccflags' Config.pm entry wasn't being properly split into - separate arguments. Fixed. - - -0.14 Fri Dec 13 14:06:29 AEST 2002 - - - Added support for MacPerl (Mac OS version 9 and below), which (as - far as I know) was never natively supported by MakeMaker. Still - lacks support for the 'test' action (because Test::Harness - requires forking, which MacPerl won't do) and compiling XS/C files - (because I don't know how to invoke a compiler on MacOS, and one - may not even be available). This change is brought to you by - Michael Schwern and the letter '('. - - - Improved processing of .xs files. Now we use the new - ExtUtils::ParseXS module if it's available, otherwise we use - backticks and write the result to a .c file ourselves. This - avoids the need to do cross-platform shell redirection. - - - Make sure all parts of 'Build test' use the not-yet-installed - version of Module::Build. This only affects the tests for this - module, not any of the module code itself. [Spotted by Schwern] - - - Oopsie - use $Config{ld} instead of $Config{cc} for linking. - - - Added a 'diff' action, which is useful for comparing the details - of what you're about to install with what is already installed on - your system. This uses File::Compare, which is in the core. - - - Fixed a problem on Windows in which the _build/ directory wasn't - getting deleted during the 'realclean' action, because we had a - file open in that directory. [Spotted by Michael Schwern] - - - delete_filetree() now always uses File::Path::rmtree(), regardless - of whether the thing being deleted is a file or a directory. This - helps remove things on obscure platforms with strange locking - rules (or even not so obscure ones like MacOS). It also now - reports the number of files or directories deleted (without - recursing directory contents). - - - rm_previous_build_script() is gone, replaced by calls to - delete_filetree(). - - - 'Build' now chdir()s in a BEGIN block, so the 'use Module::Build' - statement will work correctly. Solves a problem on MacOS, where - the 'Build' script may often be invoked from the wrong working - directory. [Fix by Michael Schwern] - - - Internally we now use the multi-argument form of system() to run - external commands (such as 'diff' or 'cc') whenever possible (and - whenever we can't avoid system() altogether). Note that this - means we have to handle splitting some strings (such as - $Config{ccflags}) into argument lists like the shell would, which - is a drag. However, the alternative would be to handle shell - quoting of all arguments to commands ourselves, which is an even - bigger drag across platforms and involves arbitrary filenames and - so on. - - - To handle the argument splitting mentioned above, a method - split_like_shell() has been created. So far it's just doing naive - processing. In practice, I've yet to actually see a %Config entry - that uses quotes & spaces, so the splitting task is usually not - very error-prone. - - - The 'test' action now takes a 'test_files' parameter, similar to - the (undocumented) ExtUtils::MakeMaker TEST_FILES argument. Handy - during development when fixing bugs. - - - Internally, the rscan_dir() method can now accept a predicate - function that decides whether a file/directory should be matched. - - - We now issue a warning message when the author hasn't specified a - license type. - -0.13 Wed Nov 20 20:07:53 AEST 2002 - - - 'cleanup' file lists are now written immediately, rather than at - program termination. This helps avoid "phantom files" that don't - get handled by the 'realclean' action. The internal - write_cleanup() method (which was never documented) is now gone. - - - The 'blib/' directory is now properly cleaned up in more (all?) - circumstances. Previously it could become a phantom if - create_build_script() was never called. - - - Now scan the 'c_source' directory for .cpp (C++) files as well as - .c files, and compiles them. - - - Use a 'phony' target for 'make manifest' in the pass-through - Makefile, for the same reason as 'make install' (see version 0.12 - notes below). - - - Module::Build::Compat now accepts any known Config.pm key and - passes it through to the Build.PL. Fixes a problem with CPANPLUS, - which was passing INSTALLMAN1DIR. - - - The file 'META.yaml' has been re-named to 'META.yml' in order to - cooperate better with systems that can only handle 3 characters - after the dot. - - - The t/xs.t test should give more informative error messages upon - failure. - -0.12 Thu Nov 14 18:31:47 AEST 2002 - - - The META.yaml file was erroneously looking for 'build_depends' - instead of 'build_requires'. [spotted by Iain Truskett] - - - Add prompt() and y_n() methods for use in Build.PLs - - - Do more to work with all versions of Test::Harness when setting - the TEST_VERBOSE flag and running under the debugger [patch by - Dave Rolsky] - - - Include a test for verbosity handling - - - Make sure the blib/ directory is always cleaned up with the - 'clean' or 'realclean' action. - - - In a pass-through Makefile.PL, inform 'make' that 'install' is a - "fake target", so that it works properly on case-insensitive - filesystems like HFS+ with distributions that contain an INSTALL - file. [patch by Brian Ingerson] - - - In Module::Build::Compat, show an example Makefile.PL that can - install Module::Build and re-invoke itself in one fell swoop [Dave - Rolsky and Autrijus Tang] - - - Improve the formatting of the Module::Build and - Module::Build::Compat documentation. - -0.11 Fri Aug 23 18:50:46 AEST 2002 - - - 'module_version' and 'module_version_from' have been replaced by - 'dist_version' and 'dist_version_from', which is what they really - meant in the first place. 'dist_name' has been added. - - - 'module_name' is now just a way to set 'dist_name' and - 'dist_version_from' in a convenient way. - - - The 'name' in META.yaml is now the distribution name, not the - (incorrect) module name. [spotted by Graham Barr] - - - Added the check_installed_status() and prereq_failures() methods - for checking prerequisite information with the programmatic - interface - - - check_installed_version() now uses check_installed_status() - internally - - - Documented the create_build_script() method, which had escaped - documentation. - - - create_build_script() now writes prerequisite information to the - _build/ directory, for use by Module::Build::Compat. - - - Module::Build::Compat has documentation for a safer way to write a - dummy Makefile.PL. [patch by Autrijus Tang] - -0.10 Wed Aug 7 19:36 2002 - - Recommend YAML 0.35 instead of 0.30. - - - Don't die during 'Build disttest' if YAML isn't installed. This - fixes tests 5-10 in runthrough.t if YAML isn't installed. - - - Die if an unknown license type is used, but still default to - 'unknown' if no license is specified. - - - Use YAML::DumpFile() if we're using a recent YAML, - YAML::StoreFile() otherwise. - - - Show specific error messages in runthrough.t. - - - Add a generated_by entry to the META.yaml file. - - - Skip a few tests if YAML isn't installed. - -0.09 Fri Jun 28 11:07:08 EST 2002 - - - The 'distdir' action wasn't deleting the distribution directory - before building it again. This meant that, say, if you did 'Build - disttest' then 'Build dist', you'd end up with a blib/ directory - in your distribution. I actually had this happen for version - 0.08, and it's not nice to distribute a blib/ on CPAN. - - - We now keep track of the 'base_dir', i.e. the top-level build - directory, so we can change back into it if we change out of it. - This necessitated a cwd() method, which uses the Cwd.pm module. - I'm aware of Cwd's limitations, particularly under taint-mode, but - I don't know a way around using it here. - - - The 'dist_dir' action now changes back into 'base_dir' directory. - - - We now do write_config() inside the create_build_script() method, - not inside the new() method. - - - Simplified the find_version() method, and improved its error - messages. - - - Renamed module_name_to_file() to find_module_by_name(), and added - a parameter specifying the directories to search in. Previously - we searched in 'lib' and @INC, which wasn't correct in all - situations. - - - Patched the docs to change "Build test" to "./Build test" - [Elizabeth Mattijsen] - -0.08 Wed Jun 26 20:30:56 EST 2002 - - - Fixed the 'prereq' alias for the 'requires' parameter - - - Added some tests in t/basic.t to test the dependency checking - - - Added 'artistic' as a licensing option [Arthur Bergman] - - - Fixed some bugs in requires/prereq/recommends/conflicts/build_depends - - - Fixed a typo in the 'distclean' action that prevented its - execution [Arthur Bergman] - - - Separated the linking phase of building XS items into its own - link_c() method. Its interface is still unstable, so it's not - documented yet. [suggested by Arthur Bergman] - -0.07 Jun 9 2002 15:46 - - - We now generate a 'META.yaml' metadata file during 'Build dist'. - This can be very useful for lots of things, none of which are - implemented yet. - - - Added a 'dynamic_config' parameter, defaulting to false. This - lets distribution systems (CPAN.pm, etc.) build, test, and install - "easy" modules without having to execute the Build.PL at runtime. - It's also a guarantee that the list of dependencies is exactly - what is present in the metadata file, and won't be changed during - the build process. - - - Added support for "recommended" and "build-time requirement" - modules, besides those that are absolutely required. Also added a - "conflicts" field. - - - Changed the 'prereq' field to 'requires' (the old name will - continue to work). - - - Added support for checking the installed version of perl as an - explicit dependency. - - - Added a 'license' parameter to specify one of a fixed number of - licenses for the distribution. - - - Fixed a bug in Module::Build::Compat that was preventing arguments - from being processed properly. [patch by Ilya Martynov] - - - Make sure we're in the right directory when we write the cleanup - file, since various ExtUtils::Install errors might leave us in an - unknown directory. [patch by Ilya Martynov] - - - Specified the 'license', 'recommends', and 'dynamic_config' - values in Build.PL, and changed 'prereq' to 'requires'. - -0.06 Apr 2 2002 17:44 - - - Added the Module::Build::Compat module for assisting and - explaining compatibility with ExtUtils::Makemaker and cohorts. - - - State is now saved using Data::Dumper instead of my ad-hoc - mechanism, guaranteeing data integrity. Whitespace values broke - in the former scheme. - - - Added the 'recommended' option, which works like 'prereq' but - isn't insistent. - - - Separated the various parameters into three groups: parameters - that tell Module::Build what to do, Config.pm parameters, and - user-defined parameters for each build (the module author is the - 'user' here). This helps avoid conflicts between names, and it - was silly to have them all together. The three groups of - parameters are subject to the same rules for overriding: values - specified during a Build action take precedence over values - specified at 'perl Build.PL' time, which in turn take precedence - over values specified in the call to new(). - - - Improved support for .PL files. Any .PL file in the lib/ - directory or the directory specified by 'c_source' will now get - properly executed. I also added a 'PL_files' parameter that you - can use in case the .PL doesn't create an obviously-named output - file. - - - If a prerequisite condition is malformed, we now report a prereq - failure and say why. Previously we issued a warning and kept - going. - - -0.05 10-Jan-2002 20:26 - - Added the Module::Build->subclass() method, which makes it easier to - make quick-and-dirty subclasses of Module::Build. - - - Reorganized the docs a bit. - - - Added the 'testdb' action, and the 'debugger=1' argument to the - 'test' action, both of which run tests under the perl - debugger. (idea: Dave Rolsky) - - - Added prerequisite checking (Dave Rolsky) - - - Fixed an unlikely-to-occur bug with misquoted strings in the - 'Build' script (spot: Dave Rolsky) - - - We're more careful about shush-ing warnings that - ExtUtils::Manifest might emit (Dave Rolsky) - - - The 'help' action now auto-generates the list of actions (Dave Rolsky) - - - Added the 'distcheck', 'skipcheck', 'distclean', 'distdir', and - 'disttest' actions (Dave Rolsky) - - - We're a little more aggressive about cleaning up temporary files - - we'll try to clean them up even when we don't have write permission - on them. This isn't as dastardly as it sounds; if we /really/ - don't have permission, we won't be able to remove them no matter - how hard we try. - -0.04 Fri Nov 16 16:55 2001 - - Added a 'manifest' action. It's just like MakeMaker's 'make manifest', it - brings your MANIFEST file up to date with your distribution directory. - - - Reorganized some of the responsibilities of various methods, which - allows modules to be built and tested programmatically. - - - The 'clean' action will now clean up files that were created more - recently than the on-disk cleanup registry was written. - - - Undefined values from Config.pm are handled correctly now. - - - The dispatch() method will now accept explicit dispatch - parameters, for use in a programmatic setting. - - - $ENV{TEST_VERBOSE} will be set in test scripts if the 'verbose=1' - parameter is set. - - - Moved the test.pl script to t/basic.t - - - Created the t/xs.t script, which tests building a module with a - .xs component. - - - Fixed the loading of $^O-specific modules (there were no such - modules before). - - - Added a 'darwin' platform module, which removes -flat_namespace - from $Config{ccflags} while building .xs modules (it's a linker - flag, not a compiler flag). - - - Now uses $^W instead of the 'warnings' pragma, which apparently - provides compatibility with perl 5.005 (I've only tested it with - 5.6.x myself). - - - If a file called C<visual.pl> exists in the top-level directory, - this file will be executed as a Perl script during 'Build test' and - its output will be shown to the user. This is a good place to put - speed tests or other tests that don't use the C<Test::Harness> format - for output. - - - The 'Build install' step will now put .xs-related things in the - correct architecture-dependent libraries. - - - Added the 'autosplit' option, even though I think autosplitting is - a load of hooie. - -0.03 Sun Nov 11 14:58 CDT 2001 - - The 'perl Build.PL' step will now detect whether the current - environment is "unixish", "windowsish", etc., and load the correct - module (i.e. Module::Build::Platform::Unix). More specific - modules may also be written for particular values of $^O. - - - Module::Build will now process any .xs files in the lib/ - directory. Please let me know whether this works or not with your - distribution & platform. I'll be trying out various distributions - on my platform. - - - Corrected some embarassing errors in the POD documentation. Also - added a long documentation section on the various build actions - (test, install, build, etc.) and added some neato ASCII art. - - - Added a 'cleanup' mechanism - any method may call the - $self->add_to_cleanup(@files) method to register files which need - to be cleaned up during 'Build clean'. - - - Added a 'Build help' action that gives a little syntax help, and - lists all the actions available. - - - Fixed a bug in which 'blib/' wasn't properly being added to @INC - when running 'Build test'. - - - For the 'Build dist' action, we'll use the 'tar' and 'gzip' - programs (as specified by Config.pm) on Unix platforms, otherwise - we'll use Archive::Tar and Compress::Zlib. - -0.02 Wed Sep 5 00:53:04 CDT 2001 - - Added POD documentation. - - - Added the 'install', 'fakeinstall', and 'dist' actions. - - - new() will now determine version string based on 'module_version', or - 'module_version_from', or 'module_name', in that order. - - - Module::Build::Base handles its file paths in a platform-independent - way, using the File:: modules - - -0.01 Sun Aug 5 01:23:10 2001 - - original version; created by h2xs 1.1.1.4 with options -XA -n Module::Build - |
|
From: Ken W. <kwi...@us...> - 2005-10-10 15:18:54
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11829 Modified Files: Changes Log Message: Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.384 retrieving revision 1.385 diff -u -d -r1.384 -r1.385 --- Changes 30 Sep 2005 01:01:42 -0000 1.384 +++ Changes 10 Oct 2005 15:18:54 -0000 1.385 @@ -2,6 +2,39 @@ 0.27_03 + - We now use ExtUtils::CBuilder to do all compiling of C code (for + example, when compiling XS modules). (This change actually + occurred in 0.27_01, but it was mistakenly omitted from the Changes + file.) + + - Fixed an issue on Win32 (and other case-tolerant + non-case-preserving systems, possibly like VMS?) in which the + current working directory would sometimes be reported with + different case, fooling us into thinking that we were in the wrong + directory. [David Golden] + + - The extra_compiler_flags setting was not actually being passed + along to ExtUtils::CBuilder so it could pass it along to the + compiler. Now it is. + + - The synonyms 'scripts' and 'prereq' for 'script_files' and + 'requires' were broken in a previous version (0.27_01, probably), + but now they're fixed. [David Golden] + + - Previously, we assumed that any custom subclass of Module::Build + was located in _build/lib/. This is only true if the author used + the subclass() method, though. We now use %INC to find where the + custom subclass really is, so that we can "use lib" it. We also + issue a warning if it seems to be outside the build directory. + [Spotted by Peter Tandler] + + - Added a URL for each license type that we know about, which will + appear as resources=>license: in the generated META.yml file. + + - If the user passes a no_index parameter to our constructor, we now + pass that through when building the META.yml file. [Richard + Soderberg, RT #9603] + - A few more status messages can now be suppressed by using 'quiet' mode. [Dave Rolsky] @@ -20,51 +53,22 @@ the "C_support" auto_feature. - When building XS files, we now pass the -DVERSION and -DXS_VERSION - flags to the compiler. [Suggested by Jerry Hedden] + flags to the compiler. [Spotted by Jerry Hedden] - If a distribution has XS files and Module::Build has not been configured with the "C_support" feature, we now issue a warning. [Suggested by Jerry Hedden] - - The synonyms 'scripts' and 'prereq' for 'script_files' and - 'requires' were broken in a previous version (0.27_01, probably), - but now they're fixed. [David Golden] - - - Previously, we assumed that any custom subclass of Module::Build - was located in _build/lib/. This is only true if the author used - the subclass() method, though. We now use %INC to find where the - custom subclass really is, so that we can "use lib" it. We also - issue a warning if it seems to be outside the build directory. - [Spotted by Peter Tandler] - - Added a dir_contains() method. - - If the user passes a no_index parameter to our constructor, we now - pass that through when building the META.yml file. [Richard - Soderberg, RT #9603] - - Some versions of MakeMaker, CPANPLUS, and/or PAUSE thought that a certain line of our code was declaring a $VERSION when we didn't intend to. The line has been obscurified so they won't think that anymore. [Jos Boumans, RT #14226] - - We now use ExtUtils::CBuilder to do all compiling of C code (for - example, when compiling XS modules). (This change actually - occurred in 0.27_01, but it was mistakenly omitted from the Changes - file.) - - - Fixed an issue on Win32 (and other case-tolerant - non-case-preserving systems, possibly like VMS?) in which the - current working directory would sometimes be reported with - different case, fooling us into thinking that we were in the wrong - directory. [David Golden] - - Added the Apache, MIT, and Mozilla licenses to the list of licenses that this module knows about. [Bob Ippolito] - - Added a URL for each license type that we know about, which will - appear as resources=>license: in the generated META.yml file. - - Fixed a pretty significant typo in the documentation for auto_features. [Spotted by Jonas B. Nielsen] @@ -79,13 +83,9 @@ and extra_linker_flags. These will automatically be run through split_like_shell() when given to new() as strings. - - When the user doesn't have ExtUtils::ParseXS installed, the - displayed command line for creating the .c file from the .xs file - was missing its newline. Now it's got it. - - - The extra_compiler_flags setting was not actually being passed - along to ExtUtils::CBuilder so it could pass it along to the - compiler. + - When the user doesn't have ExtUtils::ParseXS installed and we use + the old 'xsubpp', the displayed command line for creating the .c + file from the .xs file was missing its newline. Now it's got it. 0.27_02 (Beta for 0.28) Fri Jul 15 07:34:58 CDT 2005 |
|
From: Randy W. S. <si...@us...> - 2005-10-09 01:26:26
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10124/t Modified Files: xs.t Log Message: Some OS lock dynamic libs when they are loaded so that they cannot be removed (cygwin, MSWin32). This patch fixes it by unloading the lib before trying to remove it in some of the cases (cygwin). Index: xs.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/xs.t,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- xs.t 2 Oct 2005 05:26:07 -0000 1.28 +++ xs.t 9 Oct 2005 01:26:17 -0000 1.29 @@ -52,6 +52,9 @@ is $@, ''; { + use DynaLoader; + my $librefs_highwater = @DynaLoader::dl_librefs; + # Make sure it actually works eval 'use blib; require ' . $dist->name; is $@, ''; @@ -67,6 +70,10 @@ $sub = $dist->name->can('xs_version'); ok $sub, "xs_version() function should be defined"; is $sub->(), "0.01", "xs_version() should return the string '0.01'"; + + # unload the dll so it can be unlinked + DynaLoader::dl_unload_file($DynaLoader::dl_librefs[$librefs_highwater]) + if DynaLoader->can('dl_unload_file'); } { |
|
From: Randy W. S. <si...@us...> - 2005-10-04 11:19:47
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23713/lib/Module/Build Modified Files: ModuleInfo.pm Log Message: Handle an edge case where the lhs of an assignment to a $VERSION variable is in parenthesis. Index: ModuleInfo.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/ModuleInfo.pm,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- ModuleInfo.pm 4 Oct 2005 10:51:45 -0000 1.12 +++ ModuleInfo.pm 4 Oct 2005 11:19:38 -0000 1.13 @@ -11,7 +11,27 @@ my $PKG_REGEXP = qr/^[\s\{;]*package\s+([\w:]+)/; -my $VERS_REGEXP = qr/([\$*])(((?:::|')?(?:\w+(?:::|'))*)?VERSION)\b\s*=[^=]/; + +my $VARNAME_REGEXP = qr/ # match fully-qualified VERSION name + ([\$*]) # sigil - $ or * + ( + ( # optional leading package name + (?:::|\')? # possibly starting like just :: (ala $::VERSION) + (?:\w+(?:::|\'))* # Foo::Bar:: ... + )? + VERSION + )\b +/x; + +my $VERS_REGEXP = qr/ # match a VERSION definition + (?: + \(\s*$VARNAME_REGEXP\s*\) # with parens + | + $VARNAME_REGEXP # without parens + ) + \s* + =[^=] # = but not == +/x; sub new_from_file { @@ -109,6 +129,7 @@ return $found->[1]; } + # given a line of perl code, attempt to parse it if it looks like a # $VERSION assignment, returning sigil, full name, & package name sub _parse_version_expression { @@ -117,7 +138,7 @@ my( $sig, $var, $pkg ); if ( $line =~ $VERS_REGEXP ) { - ( $sig, $var, $pkg ) = ( $1, $2, $3 ); + ( $sig, $var, $pkg ) = $2 ? ( $1, $2, $3 ) : ( $4, $5, $6 ); if ( $pkg ) { $pkg = ($pkg eq '::') ? 'main' : $pkg; $pkg =~ s/::$//; |
|
From: Randy W. S. <si...@us...> - 2005-10-04 11:19:47
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23713/t Modified Files: moduleinfo.t Log Message: Handle an edge case where the lhs of an assignment to a $VERSION variable is in parenthesis. Index: moduleinfo.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/moduleinfo.t,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- moduleinfo.t 2 Oct 2005 02:28:28 -0000 1.11 +++ moduleinfo.t 4 Oct 2005 11:19:39 -0000 1.12 @@ -3,7 +3,7 @@ use lib 't/lib'; use strict; -use Test::More tests => 58; +use Test::More tests => 62; use File::Spec (); @@ -147,6 +147,14 @@ $x = $y, $cats = $dogs; } --- + <<'---', # $VERSION wrapped in parens - space inside +package Simple; +( $VERSION ) = '1.23'; +--- + <<'---', # $VERSION wrapped in parens - no space inside +package Simple; +($VERSION) = '1.23'; +--- ); my( $i, $n ) = ( 1, scalar( @modules ) ); |
|
From: Randy W. S. <si...@us...> - 2005-10-04 10:51:59
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16805/lib/Module/Build Modified Files: ModuleInfo.pm Log Message: Optimize multiple regex evaluations against the same string into a single evaluation. Index: ModuleInfo.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/ModuleInfo.pm,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- ModuleInfo.pm 2 Oct 2005 02:28:27 -0000 1.11 +++ ModuleInfo.pm 4 Oct 2005 10:51:45 -0000 1.12 @@ -11,7 +11,6 @@ my $PKG_REGEXP = qr/^[\s\{;]*package\s+([\w:]+)/; -#my $VERS_REGEXP = qr/([\$*])(([\w\:\']*)\bVERSION)\b\s*=[^=]/; my $VERS_REGEXP = qr/([\$*])(((?:::|')?(?:\w+(?:::|'))*)?VERSION)\b\s*=[^=]/; @@ -110,6 +109,23 @@ return $found->[1]; } +# given a line of perl code, attempt to parse it if it looks like a +# $VERSION assignment, returning sigil, full name, & package name +sub _parse_version_expression { + my $self = shift; + my $line = shift; + + my( $sig, $var, $pkg ); + if ( $line =~ $VERS_REGEXP ) { + ( $sig, $var, $pkg ) = ( $1, $2, $3 ); + if ( $pkg ) { + $pkg = ($pkg eq '::') ? 'main' : $pkg; + $pkg =~ s/::$//; + } + } + + return ( $sig, $var, $pkg ); +} sub _parse_file { my $self = shift; @@ -118,7 +134,7 @@ my $fh = IO::File->new( $filename ) or die( "Can't open '$filename': $!" ); - my( $in_pod, $seen_end, $need_vers ) = ( 0, 0,0 ); + my( $in_pod, $seen_end, $need_vers ) = ( 0, 0, 0 ); my( @pkgs, %vers, %pod, @pod ); my $pkg = 'main'; my $pod_sect = ''; @@ -152,6 +168,10 @@ $pod_sect = ''; $pod_data = ''; + # parse $line to see if it's a $VERSION declaration + my( $vers_sig, $vers_fullname, $vers_pkg ) = + $self->_parse_version_expression( $line ); + if ( $line =~ $PKG_REGEXP ) { $pkg = $1; push( @pkgs, $pkg ) unless grep( $pkg eq $_, @pkgs ); @@ -159,46 +179,49 @@ $need_vers = 1; # VERSION defined with full package spec, i.e. $Module::VERSION - } elsif ( $line =~ $VERS_REGEXP && length($3) ) { - my ($l_sig, $l_var, $l_pkg) = ($1, $2, $3); - $l_pkg = ($l_pkg eq '::') ? 'main' : $l_pkg; - $l_pkg =~ s/::$//; - - push( @pkgs, $l_pkg ) unless grep( $l_pkg eq $_, @pkgs ); - $need_vers = 0 if $l_pkg eq $pkg; + } elsif ( $vers_fullname && $vers_pkg ) { + push( @pkgs, $vers_pkg ) unless grep( $vers_pkg eq $_, @pkgs ); + $need_vers = 0 if $vers_pkg eq $pkg; - my $v = $self->_evaluate_version_line( $line ); - unless ( defined $vers{$l_pkg} && length $vers{$l_pkg} ) { - $vers{$l_pkg} = $v; + my $v = + $self->_evaluate_version_line( $vers_sig, $vers_fullname, $line ); + unless ( defined $vers{$vers_pkg} && length $vers{$vers_pkg} ) { + $vers{$vers_pkg} = $v; } else { - warn "Package '$l_pkg' already declared with version '$vers{$l_pkg}'\n" . - " ignoring new version '$v'.\n"; + warn <<"EOM"; +Package '$vers_pkg' already declared with version '$vers{$vers_pkg}' +ignoring new version '$v'. +EOM } # first non-comment line in undeclared package main is VERSION - } elsif ( !exists($vers{main}) && $pkg eq 'main' && - $line =~ $VERS_REGEXP ) { + } elsif ( !exists($vers{main}) && $pkg eq 'main' && $vers_fullname ) { $need_vers = 0; - my $v = $self->_evaluate_version_line( $line ); + my $v = + $self->_evaluate_version_line( $vers_sig, $vers_fullname, $line ); $vers{$pkg} = $v; push( @pkgs, 'main' ); # first non-comement line in undeclared packge defines package main - } elsif ( !exists($vers{main}) && $pkg eq 'main' && - $line =~ /\w+/ ) { + } elsif ( !exists($vers{main}) && $pkg eq 'main' && $line =~ /\w+/ ) { $need_vers = 1; $vers{main} = ''; push( @pkgs, 'main' ); - # only first keep if this is the first $VERSION seen - } elsif ( $line =~ $VERS_REGEXP && $need_vers ) { + # only keep if this is the first $VERSION seen + } elsif ( $vers_fullname && $need_vers ) { $need_vers = 0; - my $v = $self->_evaluate_version_line( $line ); + my $v = + $self->_evaluate_version_line( $vers_sig, $vers_fullname, $line ); + + unless ( defined $vers{$pkg} && length $vers{$pkg} ) { $vers{$pkg} = $v; } else { - warn "Package '$pkg' already declared with version '$vers{$pkg}'\n" . - " ignoring new version '$v'.\n"; + warn <<"EOM"; +Package '$pkg' already declared with version '$vers{$pkg}' +ignoring new version '$v'. +EOM } } @@ -219,12 +242,10 @@ sub _evaluate_version_line { my $self = shift; - my $line = shift; + my( $sigil, $var, $line ) = @_; # Some of this code came from the ExtUtils:: hierarchy. - my ($sigil, $var) = ($line =~ $VERS_REGEXP); - my $eval = qq{q# Hide from _packages_inside() #; package Module::Build::ModuleInfo::_version; no strict; |
|
From: Ken W. <kwi...@us...> - 2005-10-04 02:44:17
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28771/lib/Module/Build Modified Files: Base.pm Log Message: Mention why we don't use 'installstyle' Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.496 retrieving revision 1.497 diff -u -d -r1.496 -r1.497 --- Base.pm 3 Oct 2005 18:19:02 -0000 1.496 +++ Base.pm 4 Oct 2005 02:44:09 -0000 1.497 @@ -233,6 +233,10 @@ }; $p->{original_prefix}{site} ||= $p->{original_prefix}{core}; + # Note: you might be tempted to use $Config{installstyle} here + # instead of hard-coding lib/perl5, but that's been considered and + # (at least for now) rejected. `perldoc Config` has some wisdom + # about it. $p->{install_base_relpaths} = { lib => ['lib', 'perl5'], |
|
From: Randy W. S. <si...@us...> - 2005-10-03 18:19:10
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9456/t Modified Files: destinations.t install.t Log Message: Revert my previous change honoring $Config{installstyle} when the install_base options is used. I had forgotten that this issue had been discussed and the previous behavior was prefered. Index: install.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/install.t,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- install.t 3 Oct 2005 05:03:24 -0000 1.24 +++ install.t 3 Oct 2005 18:19:03 -0000 1.25 @@ -93,10 +93,7 @@ my $libdir = File::Spec->catdir(File::Spec->rootdir, 'foo', 'base'); eval {$mb->dispatch('install', install_base => $libdir, destdir => $destdir)}; is $@, ''; - - my @libstyle = $mb->{config}{installstyle} ? - File::Spec->splitdir($mb->{config}{installstyle}) : qw(lib perl5); - my $install_to = File::Spec->catfile($destdir, $libdir, @libstyle, $dist->name ) . '.pm'; + my $install_to = File::Spec->catfile($destdir, $libdir, 'lib', 'perl5', $dist->name ) . '.pm'; print "Should have installed module as $install_to\n"; ok -e $install_to; } Index: destinations.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/destinations.t,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- destinations.t 3 Oct 2005 05:03:24 -0000 1.31 +++ destinations.t 3 Oct 2005 18:19:03 -0000 1.32 @@ -32,8 +32,6 @@ isa_ok( $mb, 'Module::Build::Base' ); my $install_sets = $mb->install_sets; -my @libstyle = $mb->{config}{installstyle} ? - File::Spec->splitdir($mb->{config}{installstyle}) : qw(lib perl5); # Get us into a known state. @@ -93,9 +91,10 @@ is( $mb->prefix, undef ); is( $mb->install_base, $install_base ); + test_install_destinations( $mb, { - lib => catdir( $install_base, @libstyle ), - arch => catdir( $install_base, @libstyle, $Config{archname} ), + lib => catdir( $install_base, 'lib', 'perl5' ), + arch => catdir( $install_base, 'lib', 'perl5', $Config{archname} ), bin => catdir( $install_base, 'bin' ), script => catdir( $install_base, 'bin' ), bindoc => catdir( $install_base, 'man', 'man1'), @@ -170,8 +169,8 @@ $mb->install_base( $install_base ); test_install_destinations( $mb, { - lib => catdir( $install_base, @libstyle ), - arch => catdir( $install_base, @libstyle, $Config{archname} ), + lib => catdir( $install_base, 'lib', 'perl5' ), + arch => catdir( $install_base, 'lib', 'perl5', $Config{archname} ), bin => catdir( $install_base, 'bin' ), script => catdir( $install_base, 'bin' ), bindoc => catdir( $install_base, 'man', 'man1'), |
|
From: Randy W. S. <si...@us...> - 2005-10-03 18:19:10
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9456/lib/Module/Build Modified Files: Base.pm Log Message: Revert my previous change honoring $Config{installstyle} when the install_base options is used. I had forgotten that this issue had been discussed and the previous behavior was prefered. Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.495 retrieving revision 1.496 diff -u -d -r1.495 -r1.496 --- Base.pm 3 Oct 2005 09:55:25 -0000 1.495 +++ Base.pm 3 Oct 2005 18:19:02 -0000 1.496 @@ -182,7 +182,6 @@ my @libstyle = $c->{installstyle} ? File::Spec->splitdir($c->{installstyle}) : qw(lib perl5); - my $arch = $c->{archname}; my $version = $c->{version}; @@ -236,8 +235,8 @@ $p->{install_base_relpaths} = { - lib => [@libstyle], - arch => [@libstyle, $arch], + lib => ['lib', 'perl5'], + arch => ['lib', 'perl5', $arch], bin => ['bin'], script => ['bin'], bindoc => ['man', 'man1'], |
|
From: Randy W. S. <si...@us...> - 2005-10-03 09:55:37
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20873/lib/Module/Build Modified Files: Base.pm Log Message: Skip the check for prereqs if there are none. Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.494 retrieving revision 1.495 diff -u -d -r1.494 -r1.495 --- Base.pm 3 Oct 2005 09:12:59 -0000 1.494 +++ Base.pm 3 Oct 2005 09:55:25 -0000 1.495 @@ -933,6 +933,11 @@ "but Module::Build is not configured with C_support"); } + # Check to see if there are any prereqs to check + my $has_prereqs = grep { keys %{$self->$_()} } + @{ $self->prereq_action_types }; + return 1 unless $has_prereqs; + $self->log_info("Checking prerequisites...\n"); my $failures = $self->prereq_failures; |
|
From: Randy W. S. <si...@us...> - 2005-10-03 09:13:07
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12307/lib/Module/Build Modified Files: Base.pm Log Message: Prettify output - Part 2. Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.493 retrieving revision 1.494 diff -u -d -r1.493 -r1.494 --- Base.pm 3 Oct 2005 08:45:05 -0000 1.493 +++ Base.pm 3 Oct 2005 09:12:59 -0000 1.494 @@ -876,7 +876,8 @@ my $log_text; foreach my $type ( grep $failures->{$_}, @{$self->prereq_action_types} ) { while (my ($module, $status) = each %{$failures->{$type}}) { - $log_text .= " - $status->{message}\n"; + my $prefix = ($type =~ /recommends$/) ? '*' : '-'; + $log_text .= " $prefix $status->{message}\n"; } } $self->log_warn("$log_text") unless $self->quiet; @@ -941,11 +942,8 @@ foreach my $type ( @{$self->prereq_action_types} ) { next unless $failures->{$type}; while (my ($module, $status) = each %{$failures->{$type}}) { - if ( $type =~ /recommends$/ ) { - $self->log_warn(" * $status->{message}\n"); - } else { - $self->log_warn(" - ERROR: $status->{message}\n"); - } + my $prefix = ($type =~ /recommends$/) ? '*' : '- ERROR:'; + $self->log_warn(" $prefix $status->{message}\n"); } } @@ -1003,7 +1001,7 @@ } else { my $pm_info = Module::Build::ModuleInfo->new_from_module( $modname ); unless (defined( $pm_info )) { - @status{ qw(have message) } = ('<none>', "Prerequisite $modname is not installed"); + @status{ qw(have message) } = ('<none>', "$modname is not installed"); return \%status; } @@ -1026,7 +1024,7 @@ next if $op eq '>=' and !$version; # Module doesn't have to actually define a $VERSION unless ($self->compare_versions( $status{have}, $op, $version )) { - $status{message} = "Version $status{have} of $modname is installed, but we need version $op $version"; + $status{message} = "$modname ($status{have}) is installed, but we need version $op $version"; return \%status; } } |
|
From: Randy W. S. <si...@us...> - 2005-10-03 08:45:13
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6293/lib/Module/Build Modified Files: Base.pm Log Message: Prettify output. Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.492 retrieving revision 1.493 diff -u -d -r1.492 -r1.493 --- Base.pm 3 Oct 2005 07:24:25 -0000 1.492 +++ Base.pm 3 Oct 2005 08:45:05 -0000 1.493 @@ -859,20 +859,33 @@ my ($self) = @_; my $features = $self->auto_features; + return unless %$features; + + $self->log_info("Checking features:\n"); + + my $max_name_len; + $max_name_len = ( length($_) > $max_name_len ) ? + length($_) : $max_name_len + for keys %$features; + while (my ($name, $info) = each %$features) { - my $failures = $self->prereq_failures($info); - if ($failures) { - my $log_text = "Feature '$name' disabled because of the following prerequisite failures:\n"; + $self->log_info(" $name" . '.' x ($max_name_len - length($name) + 4)); + + if ( my $failures = $self->prereq_failures($info) ) { + $self->log_info("disabled\n"); + my $log_text; foreach my $type ( grep $failures->{$_}, @{$self->prereq_action_types} ) { while (my ($module, $status) = each %{$failures->{$type}}) { - $log_text .= " * $status->{message}\n"; + $log_text .= " - $status->{message}\n"; } } - $self->log_warn("$log_text\n"); + $self->log_warn("$log_text") unless $self->quiet; } else { - $self->log_info("Feature '$name' enabled.\n\n"); + $self->log_info("enabled\n"); } } + + $self->log_warn("\n"); } sub prereq_failures { @@ -891,13 +904,13 @@ if ($type =~ /conflicts$/) { next if !$status->{ok}; $status->{conflicts} = delete $status->{need}; - $status->{message} = "Installed version '$status->{have}' of $modname conflicts with this distribution"; + $status->{message} = "$modname ($status->{have}) conflicts with this distribution"; } elsif ($type =~ /recommends$/) { next if $status->{ok}; $status->{message} = ($status->{have} eq '<none>' - ? "Optional prerequisite $modname isn't installed" - : "Version $status->{have} of $modname is installed, but we prefer to have $spec"); + ? "Optional prerequisite $modname is not installed" + : "$modname ($status->{have}) is installed, but we prefer to have $spec"); } else { next if $status->{ok}; } @@ -919,20 +932,37 @@ "but Module::Build is not configured with C_support"); } + $self->log_info("Checking prerequisites...\n"); + my $failures = $self->prereq_failures; - return 1 unless $failures; - - foreach my $type ( @{$self->prereq_action_types} ) { - next unless $failures->{$type}; - my $prefix = $type =~ /recommends$/ ? '' : 'ERROR: '; - while (my ($module, $status) = each %{$failures->{$type}}) { - $self->log_warn(" * $prefix$status->{message}\n"); + + if ( $failures ) { + + foreach my $type ( @{$self->prereq_action_types} ) { + next unless $failures->{$type}; + while (my ($module, $status) = each %{$failures->{$type}}) { + if ( $type =~ /recommends$/ ) { + $self->log_warn(" * $status->{message}\n"); + } else { + $self->log_warn(" - ERROR: $status->{message}\n"); + } + } } + + $self->log_warn(<<'ERRSTR'); + +ERRORS/WARNINGS FOUND IN PREREQUISITES. You may wish to install the versions +of the modules indicated above before proceeding with this installation + +ERRSTR + return 0; + + } else { + + $self->log_info("Looks good\n\n"); + return 1; + } - - $self->log_warn("ERRORS/WARNINGS FOUND IN PREREQUISITES. You may wish to install the versions\n". - " of the modules indicated above before proceeding with this installation.\n\n"); - return 0; } sub perl_version { @@ -973,7 +1003,7 @@ } else { my $pm_info = Module::Build::ModuleInfo->new_from_module( $modname ); unless (defined( $pm_info )) { - @status{ qw(have message) } = ('<none>', "Prerequisite $modname isn't installed"); + @status{ qw(have message) } = ('<none>', "Prerequisite $modname is not installed"); return \%status; } @@ -1149,7 +1179,7 @@ = map $self->$_(), qw(build_script dist_name dist_version); if ( $self->delete_filetree($build_script) ) { - $self->log_info("Removed previous script '$build_script'\n"); + $self->log_info("Removed previous script '$build_script'\n\n"); } $self->log_info("Creating new '$build_script' script for ", @@ -1173,12 +1203,13 @@ require ExtUtils::Manifest; # ExtUtils::Manifest is not warnings clean. local ($^W, $ExtUtils::Manifest::Quiet) = (0,1); + $self->log_info("Checking whether your kit is complete...\n"); if (my @missed = ExtUtils::Manifest::manicheck()) { - $self->log_warn("Warning: the following files are missing in your kit:\n", + $self->log_warn("WARNING: the following files are missing in your kit:\n", "\t", join("\n\t", @missed), "\n", - "Please inform the author.\n"); + "Please inform the author.\n\n"); } else { - $self->log_info("Checking whether your kit is complete...\nLooks good\n"); + $self->log_info("Looks good\n\n"); } } |
|
From: Randy W. S. <si...@us...> - 2005-10-03 08:45:13
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6293/t Modified Files: basic.t Log Message: Prettify output. Index: basic.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/basic.t,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- basic.t 2 Oct 2005 05:26:07 -0000 1.45 +++ basic.t 3 Oct 2005 08:45:05 -0000 1.46 @@ -100,7 +100,7 @@ # Make sure the correct warning message is generated when an # optional prereq isn't installed my $flagged = 0; - local $SIG{__WARN__} = sub { $flagged = 1 if $_[0] =~ /ModuleBuildNonExistent isn't installed/}; + local $SIG{__WARN__} = sub { $flagged = 1 if $_[0] =~ /ModuleBuildNonExistent is not installed/}; my $mb = Module::Build->new( module_name => $dist->name, |
|
From: Randy W. S. <si...@us...> - 2005-10-03 07:24:37
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22321 Modified Files: Build.PL Log Message: Pass macro 'defines' straight through untouched, allowing EU::CBuilder to do the compiler dependent formatting. Index: Build.PL =================================================================== RCS file: /cvsroot/module-build/Module-Build/Build.PL,v retrieving revision 1.59 retrieving revision 1.60 diff -u -d -r1.59 -r1.60 --- Build.PL 22 Sep 2005 02:00:35 -0000 1.59 +++ Build.PL 3 Oct 2005 07:24:24 -0000 1.60 @@ -58,7 +58,7 @@ C_support => { description => "Can compile/link C & XS code", - requires => { 'ExtUtils::CBuilder' => 0.02, + requires => { 'ExtUtils::CBuilder' => 0.15, 'ExtUtils::ParseXS' => 2.02, }, }, manpage_support => |
|
From: Randy W. S. <si...@us...> - 2005-10-03 07:24:33
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22321/lib/Module/Build Modified Files: Base.pm Log Message: Pass macro 'defines' straight through untouched, allowing EU::CBuilder to do the compiler dependent formatting. Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.491 retrieving revision 1.492 diff -u -d -r1.491 -r1.492 --- Base.pm 3 Oct 2005 07:06:17 -0000 1.491 +++ Base.pm 3 Oct 2005 07:24:25 -0000 1.492 @@ -3187,7 +3187,7 @@ sub have_c_compiler { my ($self) = @_; - my $p = $self->{properties}; + my $p = $self->{properties}; return $p->{have_compiler} if defined $p->{have_compiler}; $self->log_verbose("Checking if compiler tools configured... "); @@ -3204,16 +3204,11 @@ $self->add_to_cleanup($obj_file); return $obj_file if $self->up_to_date($file, $obj_file); - # XXX the -D syntax might not be very portable - my $flags = $self->extra_compiler_flags; - if ($args{defines}) { - $flags = [@$flags, map "-D$_=$args{defines}{$_}", keys %{$args{defines}}]; - } - $b->compile(source => $file, + defines => $args{defines}, object_file => $obj_file, include_dirs => $self->include_dirs, - extra_compiler_flags => $flags, + extra_compiler_flags => $self->extra_compiler_flags, ); return $obj_file; |
|
From: Randy W. S. <si...@us...> - 2005-10-03 07:06:27
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18332/lib/Module/Build Modified Files: Base.pm Log Message: Declare 'uninst' as a boolean option. Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.490 retrieving revision 1.491 diff -u -d -r1.490 -r1.491 --- Base.pm 3 Oct 2005 05:03:24 -0000 1.490 +++ Base.pm 3 Oct 2005 07:06:17 -0000 1.491 @@ -1362,6 +1362,7 @@ ignore_prereq_requires ignore_prereqs skip_rcfile + uninst ); # inverted boolean options; eg --noverbose or --no-verbose |
|
From: Randy W. S. <si...@us...> - 2005-10-03 05:03:34
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26851/t Modified Files: destinations.t install.t Log Message: We need to honor $Config{installstyle} when install_base is used otherwise perl can't find the installed libraries. Index: install.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/install.t,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- install.t 2 Oct 2005 05:26:07 -0000 1.23 +++ install.t 3 Oct 2005 05:03:24 -0000 1.24 @@ -93,7 +93,10 @@ my $libdir = File::Spec->catdir(File::Spec->rootdir, 'foo', 'base'); eval {$mb->dispatch('install', install_base => $libdir, destdir => $destdir)}; is $@, ''; - my $install_to = File::Spec->catfile($destdir, $libdir, 'lib', 'perl5', $dist->name ) . '.pm'; + + my @libstyle = $mb->{config}{installstyle} ? + File::Spec->splitdir($mb->{config}{installstyle}) : qw(lib perl5); + my $install_to = File::Spec->catfile($destdir, $libdir, @libstyle, $dist->name ) . '.pm'; print "Should have installed module as $install_to\n"; ok -e $install_to; } Index: destinations.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/destinations.t,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- destinations.t 3 Oct 2005 03:51:06 -0000 1.30 +++ destinations.t 3 Oct 2005 05:03:24 -0000 1.31 @@ -32,6 +32,8 @@ isa_ok( $mb, 'Module::Build::Base' ); my $install_sets = $mb->install_sets; +my @libstyle = $mb->{config}{installstyle} ? + File::Spec->splitdir($mb->{config}{installstyle}) : qw(lib perl5); # Get us into a known state. @@ -91,10 +93,9 @@ is( $mb->prefix, undef ); is( $mb->install_base, $install_base ); - test_install_destinations( $mb, { - lib => catdir( $install_base, 'lib', 'perl5' ), - arch => catdir( $install_base, 'lib', 'perl5', $Config{archname} ), + lib => catdir( $install_base, @libstyle ), + arch => catdir( $install_base, @libstyle, $Config{archname} ), bin => catdir( $install_base, 'bin' ), script => catdir( $install_base, 'bin' ), bindoc => catdir( $install_base, 'man', 'man1'), @@ -169,8 +170,8 @@ $mb->install_base( $install_base ); test_install_destinations( $mb, { - lib => catdir( $install_base, 'lib', 'perl5' ), - arch => catdir( $install_base, 'lib', 'perl5', $Config{archname} ), + lib => catdir( $install_base, @libstyle ), + arch => catdir( $install_base, @libstyle, $Config{archname} ), bin => catdir( $install_base, 'bin' ), script => catdir( $install_base, 'bin' ), bindoc => catdir( $install_base, 'man', 'man1'), |
|
From: Randy W. S. <si...@us...> - 2005-10-03 05:03:31
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26851/lib/Module/Build Modified Files: Base.pm Log Message: We need to honor $Config{installstyle} when install_base is used otherwise perl can't find the installed libraries. Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.489 retrieving revision 1.490 diff -u -d -r1.489 -r1.490 --- Base.pm 30 Sep 2005 01:09:53 -0000 1.489 +++ Base.pm 3 Oct 2005 05:03:24 -0000 1.490 @@ -182,6 +182,7 @@ my @libstyle = $c->{installstyle} ? File::Spec->splitdir($c->{installstyle}) : qw(lib perl5); + my $arch = $c->{archname}; my $version = $c->{version}; @@ -235,8 +236,8 @@ $p->{install_base_relpaths} = { - lib => ['lib', 'perl5'], - arch => ['lib', 'perl5', $arch], + lib => [@libstyle], + arch => [@libstyle, $arch], bin => ['bin'], script => ['bin'], bindoc => ['man', 'man1'], |
|
From: Randy W. S. <si...@us...> - 2005-10-03 03:51:14
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13135/t Modified Files: destinations.t Log Message: File::Spec on Cygwin insists on adding a trailing slash in some path names. Remove them before performing comparisons. Index: destinations.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/destinations.t,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- destinations.t 28 Sep 2005 04:37:15 -0000 1.29 +++ destinations.t 3 Oct 2005 03:51:06 -0000 1.30 @@ -199,8 +199,13 @@ sub have_same_ending { my ($dir1, $dir2, $message) = @_; + + $dir1 =~ s{/$}{} if $^O eq 'cygwin'; # remove any trailing slash my @dir1 = splitdir $dir1; + + $dir2 =~ s{/$}{} if $^O eq 'cygwin'; # remove any trailing slash my @dir2 = splitdir $dir2; + is $dir1[-1], $dir2[-1], $message; } |
|
From: Randy W. S. <si...@us...> - 2005-10-02 23:06:13
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6578/t Modified Files: basic.t compat.t install.t manifypods.t runthrough.t signature.t xs.t Log Message: Change tests from using "ok ! $@" to "is $@, \' for better diagnostics. Index: signature.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/signature.t,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- signature.t 29 Jun 2005 08:27:06 -0000 1.12 +++ signature.t 2 Oct 2005 05:26:07 -0000 1.13 @@ -52,7 +52,7 @@ { eval {$mb->dispatch('distdir')}; - ok ! $@; + is $@, ''; chdir( $mb->dist_dir ) or die "Can't chdir to '@{[$mb->dist_dir]}': $!"; ok -e 'SIGNATURE'; @@ -71,13 +71,13 @@ local *Module::Build::Base::ACTION_distmeta = sub { push @run_order, 'distmeta' }; eval { $mb->dispatch('distdir') }; } - ok ! $@; + is $@, ''; is $run_order[0], 'distmeta'; is $run_order[1], 'sign'; } eval { $mb->dispatch('realclean') }; -ok ! $@; +is $@, ''; # cleanup Index: compat.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/compat.t,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- compat.t 29 Jun 2005 08:27:06 -0000 1.31 +++ compat.t 2 Oct 2005 05:26:07 -0000 1.32 @@ -85,7 +85,7 @@ my $warning = ''; local $SIG{__WARN__} = sub { $warning = shift; }; my $maketext = eval { Module::Build::Compat->fake_makefile(makefile => 'Makefile') }; - ok ! $@; + is $@, ''; like $maketext, qr/^realclean/m; like $warning, qr/build_class/; } Index: install.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/install.t,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- install.t 29 Jun 2005 08:27:06 -0000 1.22 +++ install.t 2 Oct 2005 05:26:07 -0000 1.23 @@ -53,7 +53,7 @@ { eval {$mb->dispatch('install', destdir => $destdir)}; - ok ! $@; + is $@, ''; my $libdir = strip_volume( $mb->install_destination('lib') ); my $install_to = File::Spec->catfile($destdir, $libdir, $dist->name ) . '.pm'; @@ -62,7 +62,7 @@ local @INC = (@INC, File::Spec->catdir($destdir, $libdir)); eval "require @{[$dist->name]}"; - ok ! $@; + is $@, ''; # Make sure there's a packlist installed my $archdir = $mb->install_destination('arch'); @@ -73,7 +73,7 @@ { eval {$mb->dispatch('install', installdirs => 'core', destdir => $destdir)}; - ok ! $@; + is $@, ''; my $libdir = strip_volume( $Config{installprivlib} ); my $install_to = File::Spec->catfile($destdir, $libdir, $dist->name ) . '.pm'; print "Should have installed module as $install_to\n"; Index: xs.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/xs.t,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- xs.t 23 Sep 2005 02:34:19 -0000 1.27 +++ xs.t 2 Oct 2005 05:26:07 -0000 1.28 @@ -46,10 +46,10 @@ eval {$mb->dispatch('clean')}; -ok ! $@; +is $@, ''; eval {$mb->dispatch('build')}; -ok ! $@; +is $@, ''; { # Make sure it actually works @@ -72,19 +72,19 @@ { # Try again in a subprocess eval {$mb->dispatch('clean')}; - ok ! $@; + is $@, ''; $mb->create_build_script; ok -e 'Build'; eval {$mb->run_perl_script('Build')}; - ok ! $@; + is $@, ''; } # We can't be verbose in the sub-test, because Test::Harness will # think that the output is for the top-level test. eval {$mb->dispatch('test')}; -ok ! $@; +is $@, ''; { $mb->dispatch('ppd', args => {codebase => '/path/to/codebase-xs'}); @@ -118,15 +118,15 @@ unless $mb->os_type eq 'Unix'; eval {$mb->dispatch('clean')}; - ok ! $@; + is $@, ''; local $mb->{config}{ld} = "FOO=BAR $mb->{config}{ld}"; eval {$mb->dispatch('build')}; - ok ! $@; + is $@, ''; } eval {$mb->dispatch('realclean')}; -ok ! $@; +is $@, ''; # Make sure blib/ is gone after 'realclean' ok ! -e 'blib'; Index: manifypods.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/manifypods.t,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- manifypods.t 28 Jul 2005 03:07:01 -0000 1.15 +++ manifypods.t 2 Oct 2005 05:26:07 -0000 1.16 @@ -103,7 +103,7 @@ $mb->dispatch('build'); eval {$mb->dispatch('docs')}; -ok ! $@; +is $@, ''; while (my ($from, $v) = each %distro) { if (!$v) { Index: runthrough.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/runthrough.t,v retrieving revision 1.57 retrieving revision 1.58 diff -u -d -r1.57 -r1.58 --- runthrough.t 29 Jun 2005 08:27:06 -0000 1.57 +++ runthrough.t 2 Oct 2005 05:26:07 -0000 1.58 @@ -80,7 +80,7 @@ $mb->add_to_cleanup('before_script'); eval {$mb->create_build_script}; -ok ! $@; +is $@, ''; ok -e $mb->build_script; is $mb->dist_dir, 'Simple-0.01'; @@ -97,7 +97,7 @@ my $output = eval { stdout_of( sub { $mb->dispatch('test', verbose => 1) } ) }; -ok ! $@; +is $@, ''; like $output, qr/all tests successful/i; # This is the output of lib/Simple/Script.PL @@ -114,13 +114,13 @@ skip( 'YAML_support feature is not enabled', 7 ) unless $have_yaml; eval {$mb->dispatch('disttest')}; - ok ! $@; + is $@, ''; # After a test, the distdir should contain a blib/ directory ok -e File::Spec->catdir('Simple-0.01', 'blib'); eval {$mb->dispatch('distdir')}; - ok ! $@; + is $@, ''; # The 'distdir' should contain a lib/ directory ok -e File::Spec->catdir('Simple-0.01', 'lib'); @@ -142,7 +142,7 @@ $mb->add_to_cleanup($mb->dist_dir . ".tar.gz"); eval {$mb->dispatch('dist')}; - ok ! $@; + is $@, ''; } } @@ -187,7 +187,7 @@ eval {$mb->dispatch('realclean')}; -ok ! $@; +is $@, ''; ok ! -e $mb->build_script; ok ! -e $mb->config_dir; Index: basic.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/basic.t,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- basic.t 29 Jul 2005 03:24:42 -0000 1.44 +++ basic.t 2 Oct 2005 05:26:07 -0000 1.45 @@ -147,7 +147,7 @@ $dist->regen; eval {Module::Build->run_perl_script('Build.PL', [], ['skip_rcfile=1', '--config', "foocakes=barcakes", '--foo', '--bar', '--bar', '-bat=hello', 'gee=whiz', '--any', 'hey', '--destdir', 'yo', '--verbose', '1'])}; - ok ! $@; + is $@, ''; my $mb = Module::Build->resume; is $mb->config->{cc}, $Config{cc}; |
|
From: Randy W. S. <si...@us...> - 2005-10-02 20:00:58
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14772/t Modified Files: moduleinfo.t Log Message: Extend ModuleInfo to recognize full qualified variable name in $VERSION assignments. Index: moduleinfo.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/moduleinfo.t,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- moduleinfo.t 19 Sep 2005 15:13:29 -0000 1.10 +++ moduleinfo.t 2 Oct 2005 02:28:28 -0000 1.11 @@ -3,7 +3,7 @@ use lib 't/lib'; use strict; -use Test::More tests => 50; +use Test::More tests => 58; use File::Spec (); @@ -126,6 +126,20 @@ # whatever } --- + <<'---', # Fully qualified $VERSION declared in package +package Simple; +$Simple::VERSION = 1.23; +--- + <<'---', # Differentiate fully qualified $VERSION in a package +package Simple; +$Simple2::VERSION = '999'; +$Simple::VERSION = 1.23; +--- + <<'---', # Differentiate fully qualified $VERSION and unqualified +package Simple; +$Simple2::VERSION = '999'; +$VERSION = 1.23; +--- <<'---', # $VERSION declared as package variable from within 'main' package $Simple::VERSION = '1.23'; { @@ -147,6 +161,7 @@ my $warnings = ''; local $SIG{__WARN__} = sub { $warnings .= $_ for @_ }; my $pm_info = Module::Build::ModuleInfo->new_from_file( $file ); + is( $pm_info->version, '1.23', "correct module version ($i of $n)" ); is( $warnings, '', 'no warnings from parsing' ); @@ -239,6 +254,16 @@ package main; $VERSION = '0.01'; --- + <<'---', # define 'main' version from other package +package _private; +$::VERSION = 0.01; +$VERSION = '999'; +--- + <<'---', # define 'main' version from other package +package _private; +$VERSION = '999'; +$::VERSION = 0.01; +--- ); ( $i, $n ) = ( 1, scalar( @scripts ) ); |
|
From: Randy W. S. <si...@us...> - 2005-10-02 19:19:59
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14772/lib/Module/Build Modified Files: ModuleInfo.pm Log Message: Extend ModuleInfo to recognize full qualified variable name in $VERSION assignments. Index: ModuleInfo.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/ModuleInfo.pm,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- ModuleInfo.pm 10 Sep 2005 03:53:10 -0000 1.10 +++ ModuleInfo.pm 2 Oct 2005 02:28:27 -0000 1.11 @@ -11,7 +11,8 @@ my $PKG_REGEXP = qr/^[\s\{;]*package\s+([\w:]+)/; -my $VERS_REGEXP = qr/([\$*])(([\w\:\']*)\bVERSION)\b\s*=[^=]/; +#my $VERS_REGEXP = qr/([\$*])(([\w\:\']*)\bVERSION)\b\s*=[^=]/; +my $VERS_REGEXP = qr/([\$*])(((?:::|')?(?:\w+(?:::|'))*)?VERSION)\b\s*=[^=]/; sub new_from_file { @@ -152,18 +153,35 @@ $pod_data = ''; if ( $line =~ $PKG_REGEXP ) { - $pkg = $1; - push( @pkgs, $pkg ) unless grep( $pkg eq $_, @pkgs ); - $vers{$pkg} = undef unless exists( $vers{$pkg} ); + $pkg = $1; + push( @pkgs, $pkg ) unless grep( $pkg eq $_, @pkgs ); + $vers{$pkg} = undef unless exists( $vers{$pkg} ); $need_vers = 1; + # VERSION defined with full package spec, i.e. $Module::VERSION + } elsif ( $line =~ $VERS_REGEXP && length($3) ) { + my ($l_sig, $l_var, $l_pkg) = ($1, $2, $3); + $l_pkg = ($l_pkg eq '::') ? 'main' : $l_pkg; + $l_pkg =~ s/::$//; + + push( @pkgs, $l_pkg ) unless grep( $l_pkg eq $_, @pkgs ); + $need_vers = 0 if $l_pkg eq $pkg; + + my $v = $self->_evaluate_version_line( $line ); + unless ( defined $vers{$l_pkg} && length $vers{$l_pkg} ) { + $vers{$l_pkg} = $v; + } else { + warn "Package '$l_pkg' already declared with version '$vers{$l_pkg}'\n" . + " ignoring new version '$v'.\n"; + } + # first non-comment line in undeclared package main is VERSION } elsif ( !exists($vers{main}) && $pkg eq 'main' && $line =~ $VERS_REGEXP ) { - $need_vers = 0; - my $v = $self->_evaluate_version_line( $line ); - $vers{$pkg} = $v; - push( @pkgs, 'main' ); + $need_vers = 0; + my $v = $self->_evaluate_version_line( $line ); + $vers{$pkg} = $v; + push( @pkgs, 'main' ); # first non-comement line in undeclared packge defines package main } elsif ( !exists($vers{main}) && $pkg eq 'main' && @@ -172,13 +190,13 @@ $vers{main} = ''; push( @pkgs, 'main' ); + # only first keep if this is the first $VERSION seen } elsif ( $line =~ $VERS_REGEXP && $need_vers ) { - # only first keep if this is the first $VERSION seen $need_vers = 0; - my $v = $self->_evaluate_version_line( $line ); + my $v = $self->_evaluate_version_line( $line ); unless ( defined $vers{$pkg} && length $vers{$pkg} ) { $vers{$pkg} = $v; - } else { + } else { warn "Package '$pkg' already declared with version '$vers{$pkg}'\n" . " ignoring new version '$v'.\n"; } @@ -207,7 +225,6 @@ my ($sigil, $var) = ($line =~ $VERS_REGEXP); - my $eval = qq{q# Hide from _packages_inside() #; package Module::Build::ModuleInfo::_version; no strict; |