module-build-checkins Mailing List for Module::Build (Page 6)
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...> - 2006-03-04 00:42:51
|
Update of /cvsroot/module-build/Module-Build/lib/Module In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7301/lib/Module Modified Files: Build.pm Log Message: Incorporated code from the 'pl2bat' utility distributed with Perl to avoid shell quoting insufficiencies and differences in various flavors of Windows. Updated documentation to give examples of invoking builds under Windows. Index: Build.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build.pm,v retrieving revision 1.209 retrieving revision 1.210 diff -u -d -r1.209 -r1.210 --- Build.pm 2 Feb 2006 02:11:19 -0000 1.209 +++ Build.pm 4 Mar 2006 00:42:44 -0000 1.210 @@ -112,13 +112,13 @@ ./Build test ./Build install -Or, if you're on a platform (like DOS or Windows) that doesn't like +Or, if you're on a platform (like DOS or Windows) that doesn't require the "./" notation, you can do this: perl Build.PL - perl Build - perl Build test - perl Build install + Build + Build test + Build install =head1 DESCRIPTION |
From: Ken W. <kwi...@us...> - 2006-03-03 23:04:42
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build/Platform In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29714/lib/Module/Build/Platform Modified Files: Windows.pm Log Message: Avoid a bareword-under-strict error when this sub isn't defined Index: Windows.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Platform/Windows.pm,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- Windows.pm 23 Feb 2006 04:03:52 -0000 1.30 +++ Windows.pm 3 Mar 2006 23:04:38 -0000 1.31 @@ -105,7 +105,7 @@ # Syntax differs between 9x & NT: the later requires a null arg (???) require Win32; - my $null_arg = (Win32::GetOSVersion == 2) ? '""' : ''; + my $null_arg = (Win32::GetOSVersion() == 2) ? '""' : ''; my $cmd = qq(start $null_arg /min "\%comspec\%" /c del "$full_progname"); my $fh = IO::File->new(">> $basename.bat") |
From: Ken W. <kwi...@us...> - 2006-03-03 04:34:16
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6836 Modified Files: Tag: release-0_26_branch Changes Log Message: Version bump Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.299.2.52 retrieving revision 1.299.2.53 diff -u -d -r1.299.2.52 -r1.299.2.53 --- Changes 3 Mar 2006 04:23:55 -0000 1.299.2.52 +++ Changes 3 Mar 2006 04:34:13 -0000 1.299.2.53 @@ -1,6 +1,6 @@ Revision history for Perl extension Module::Build. -0.2612 +0.2612 Thu Mar 2 22:27:37 CST 2006 - We now use File::Spec->tmpdir rather than the local _build/ directory when checking for a C compiler, because sometimes the |
From: Ken W. <kwi...@us...> - 2006-03-03 04:28:17
|
Update of /cvsroot/module-build/Module-Build/lib/Module In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2965/lib/Module Modified Files: Tag: release-0_26_branch Build.pm Log Message: Version bump Index: Build.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build.pm,v retrieving revision 1.164.2.16 retrieving revision 1.164.2.17 diff -u -d -r1.164.2.16 -r1.164.2.17 --- Build.pm 14 Jun 2005 03:23:56 -0000 1.164.2.16 +++ Build.pm 3 Mar 2006 04:28:11 -0000 1.164.2.17 @@ -15,7 +15,7 @@ use vars qw($VERSION @ISA); @ISA = qw(Module::Build::Base); -$VERSION = '0.2611'; +$VERSION = '0.2612'; $VERSION = eval $VERSION; # Okay, this is the brute-force method of finding out what kind of |
From: Ken W. <kwi...@us...> - 2006-03-03 04:23:59
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv337 Modified Files: Tag: release-0_26_branch Changes Log Message: Integrate YAML-related change from mainline Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.299.2.51 retrieving revision 1.299.2.52 diff -u -d -r1.299.2.51 -r1.299.2.52 --- Changes 4 Dec 2005 01:37:21 -0000 1.299.2.51 +++ Changes 3 Mar 2006 04:23:55 -0000 1.299.2.52 @@ -10,6 +10,10 @@ and no author could be determined for this distribution - this has now been fixed. + - Merged in a YAML-related change from the 0.27_xx (beta) line that + should allow us to work with recent (greater than version 0.49) + versions of YAML. [Re-spotted by Adam Kennedy] + 0.2611 Mon Jun 13 22:22:53 CDT 2005 - Fix the output of an informational message that we output when |
From: Ken W. <kwi...@us...> - 2006-03-03 04:23:58
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv337/lib/Module/Build Modified Files: Tag: release-0_26_branch Base.pm Log Message: Integrate YAML-related change from mainline Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.340.2.34 retrieving revision 1.340.2.35 diff -u -d -r1.340.2.34 -r1.340.2.35 --- Base.pm 4 Dec 2005 01:37:21 -0000 1.340.2.34 +++ Base.pm 3 Mar 2006 04:23:55 -0000 1.340.2.35 @@ -2274,6 +2274,7 @@ } require YAML; + require YAML::Node; # We use YAML::Node to get the order nice in the YAML file. my $node = YAML::Node->new({}); |
From: Ken W. <kwi...@us...> - 2006-03-02 21:28:14
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15030 Modified Files: Changes Log Message: Obfuscate one of our constructs that uses a $VERSION variable Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.430 retrieving revision 1.431 diff -u -d -r1.430 -r1.431 --- Changes 2 Mar 2006 21:15:20 -0000 1.430 +++ Changes 2 Mar 2006 21:28:09 -0000 1.431 @@ -27,6 +27,10 @@ - Fix detection of $VERSION expressions that are not assignments. [Spotted by Chris Dolan] + - Obfuscate one of our constructs that uses a $VERSION variable, + because it was getting picked up by ExtUtils::MakeMaker's + version-finder. [Spotted by Randal Schwartz] + - The config_data script for querying and/or setting a module's config data was forgetting to call write() after setting config values (though setting feature values was working fine). |
From: Ken W. <kwi...@us...> - 2006-03-02 21:28:14
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15030/lib/Module/Build Modified Files: Base.pm Log Message: Obfuscate one of our constructs that uses a $VERSION variable Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.550 retrieving revision 1.551 diff -u -d -r1.550 -r1.551 --- Base.pm 27 Feb 2006 02:29:50 -0000 1.550 +++ Base.pm 2 Mar 2006 21:28:09 -0000 1.551 @@ -2726,7 +2726,8 @@ $self->output_fh($_[1]) if $_[1]; $self->$old_parse_file($_[0]); } - if $Pod::Text::VERSION == 3.01; + if $Pod::Text::VERSION + == 3.01; # Split line to avoid evil version-finder Pod::Text::pod2text( $docfile, $fh ); |
From: Ken W. <kwi...@us...> - 2006-03-02 21:15:28
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6820 Modified Files: Changes Log Message: Make sure we call write() after setting config values Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.429 retrieving revision 1.430 diff -u -d -r1.429 -r1.430 --- Changes 1 Mar 2006 22:46:22 -0000 1.429 +++ Changes 2 Mar 2006 21:15:20 -0000 1.430 @@ -27,6 +27,11 @@ - Fix detection of $VERSION expressions that are not assignments. [Spotted by Chris Dolan] + - The config_data script for querying and/or setting a module's + config data was forgetting to call write() after setting config + values (though setting feature values was working fine). + Fixed. [Brian Duggan] + - On Windows, remove the pl2bat generated 'Build.bat' script without the annoying "The batch file cannot be found." error. [Solution provided by RazTK and foxidrive on newsgroup alt.msdos.batch] |
From: Ken W. <kwi...@us...> - 2006-03-02 21:15:28
|
Update of /cvsroot/module-build/Module-Build/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6820/scripts Modified Files: config_data Log Message: Make sure we call write() after setting config values Index: config_data =================================================================== RCS file: /cvsroot/module-build/Module-Build/scripts/config_data,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- config_data 14 Jul 2005 03:03:56 -0000 1.2 +++ config_data 2 Mar 2006 21:15:20 -0000 1.3 @@ -83,6 +83,7 @@ } $cf->set_config($k, $v); } + $cf->write; print "Config value" . 's'x(keys(%to_set)>1) . " saved\n"; } |
From: Ken W. <kwi...@us...> - 2006-03-01 22:46:32
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17471 Modified Files: Changes Log Message: Fix a dying bug in the pass-through Makefile.PL Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.428 retrieving revision 1.429 diff -u -d -r1.428 -r1.429 --- Changes 27 Feb 2006 02:29:50 -0000 1.428 +++ Changes 1 Mar 2006 22:46:22 -0000 1.429 @@ -5,6 +5,11 @@ - Modify add_build_element() so that it only adds elements if they don't already exist. [David Wheeler] + - Fixed a bug in the 'pass-through' Makefile.PL in which we would die + if CPAN::Shell->install returned false, but apparently this return + value is unreliable. Now we only die if the module is actually + unavailable after installation. + - Fixed testing problems on VMS related to non-case-preserving filesystems. We now bundle Tie::CPHash in the distribution (just for testing purposes, it doesn't get installed) to help with |
From: Ken W. <kwi...@us...> - 2006-03-01 22:46:30
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17471/lib/Module/Build Modified Files: Compat.pm Log Message: Fix a dying bug in the pass-through Makefile.PL Index: Compat.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Compat.pm,v retrieving revision 1.73 retrieving revision 1.74 diff -u -d -r1.73 -r1.74 --- Compat.pm 3 Dec 2005 03:08:14 -0000 1.73 +++ Compat.pm 1 Mar 2006 22:46:22 -0000 1.74 @@ -90,8 +90,8 @@ # Save this 'cause CPAN will chdir all over the place. my $cwd = Cwd::cwd(); - CPAN::Shell->install('Module::Build::Compat') - or die " *** Cannot install without Module::Build. Exiting ...\n"; + # There seems to be no way to determine if this install was successful + CPAN::Shell->install('Module::Build::Compat'); chdir $cwd or die "Cannot chdir() back to $cwd: $!"; } |
From: Ken W. <kwi...@us...> - 2006-02-27 02:29:57
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23292 Modified Files: Changes Log Message: Don't die in have_c_compiler() when EU::CBuilder isn't around Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.427 retrieving revision 1.428 diff -u -d -r1.427 -r1.428 --- Changes 25 Feb 2006 21:14:21 -0000 1.427 +++ Changes 27 Feb 2006 02:29:50 -0000 1.428 @@ -15,6 +15,10 @@ META.yml spec (which, for heaven's sake, we wrote) its default value is true. Fixed. [Spotted by Adam Kennedy] + - The have_c_compiler() method was dying if the ExtUtils::CBuilder + module wasn't around, which is obviously an unhelpful thing to do. + Now it just returns false. [Spotted by John Peacock] + - Fix detection of $VERSION expressions that are not assignments. [Spotted by Chris Dolan] |
From: Ken W. <kwi...@us...> - 2006-02-27 02:29:57
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23292/lib/Module/Build Modified Files: Base.pm Log Message: Don't die in have_c_compiler() when EU::CBuilder isn't around Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.549 retrieving revision 1.550 diff -u -d -r1.549 -r1.550 --- Base.pm 25 Feb 2006 03:51:27 -0000 1.549 +++ Base.pm 27 Feb 2006 02:29:50 -0000 1.550 @@ -3484,10 +3484,8 @@ my $self = shift; my $p = $self->{properties}; return $p->{_cbuilder} if $p->{_cbuilder}; + return unless $self->_mb_feature('C_support'); - die "Module::Build is not configured with C_support" - unless $self->_mb_feature('C_support'); - require ExtUtils::CBuilder; return $p->{_cbuilder} = ExtUtils::CBuilder->new(config => $self->config); } @@ -3499,14 +3497,16 @@ return $p->{have_compiler} if defined $p->{have_compiler}; $self->log_verbose("Checking if compiler tools configured... "); - my $have = $self->_cbuilder->have_compiler; + my $b = $self->_cbuilder; + my $have = $b && $b->have_compiler; $self->log_verbose($have ? "ok.\n" : "failed.\n"); return $p->{have_compiler} = $have; } sub compile_c { my ($self, $file, %args) = @_; - my $b = $self->_cbuilder; + my $b = $self->_cbuilder + or die "Module::Build is not configured with C_support"; my $obj_file = $b->object_file($file); $self->add_to_cleanup($obj_file); @@ -3539,7 +3539,9 @@ my $module_name = $self->module_name; $module_name ||= $spec->{module_name}; - $self->_cbuilder->link( + my $b = $self->_cbuilder + or die "Module::Build is not configured with C_support"; + $b->link( module_name => $module_name, objects => [$spec->{obj_file}, @$objects], lib_file => $spec->{lib_file}, |
From: Ken W. <kwi...@us...> - 2006-02-25 21:14:27
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8689/lib/Module/Build Modified Files: Authoring.pod Log Message: Fix docs on dynamic_config Index: Authoring.pod =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Authoring.pod,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- Authoring.pod 30 Jan 2006 23:14:25 -0000 1.30 +++ Authoring.pod 25 Feb 2006 21:14:21 -0000 1.31 @@ -273,14 +273,14 @@ A boolean flag indicating whether the F<Build.PL> file must be executed, or whether this module can be built, tested and installed -solely from consulting its metadata file. The default value is 0, -reflecting the fact that "most" of the modules on CPAN just need to be -copied from one place to another. The main reason to set this to a -true value is that your module performs some dynamic configuration as -part of its build/install process. +solely from consulting its metadata file. The main reason to set this +to a true value is that your module performs some dynamic +configuration as part of its build/install process. If the flag is +omitted, the F<META.yml> spec says that installation tools should +treat it as 1 (true), because this is a safer way to behave. Currently C<Module::Build> doesn't actually do anything with this flag -- it's probably going to be up to tools like C<CPAN.pm> to do +- it's up to higher-level tools like C<CPAN.pm> to do something useful with it. It can potentially bring lots of security, packaging, and convenience improvements. |
From: Ken W. <kwi...@us...> - 2006-02-25 21:14:25
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8689 Modified Files: Changes Log Message: Fix docs on dynamic_config Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.426 retrieving revision 1.427 diff -u -d -r1.426 -r1.427 --- Changes 25 Feb 2006 15:27:26 -0000 1.426 +++ Changes 25 Feb 2006 21:14:21 -0000 1.427 @@ -10,6 +10,11 @@ for testing purposes, it doesn't get installed) to help with this. [Craig Berry and Yitzchak Scott-Thoennes] + - We incorrectly documented the 'dynamic_config' flag in the META.yml + file as having a default value of false, but according to the + META.yml spec (which, for heaven's sake, we wrote) its default + value is true. Fixed. [Spotted by Adam Kennedy] + - Fix detection of $VERSION expressions that are not assignments. [Spotted by Chris Dolan] |
From: Ken W. <kwi...@us...> - 2006-02-25 15:27:35
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7643 Modified Files: Changes MANIFEST Log Message: Fix for non-case-preserving test stuff on VMS Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.425 retrieving revision 1.426 diff -u -d -r1.425 -r1.426 --- Changes 25 Feb 2006 03:51:27 -0000 1.425 +++ Changes 25 Feb 2006 15:27:26 -0000 1.426 @@ -5,6 +5,11 @@ - Modify add_build_element() so that it only adds elements if they don't already exist. [David Wheeler] + - Fixed testing problems on VMS related to non-case-preserving + filesystems. We now bundle Tie::CPHash in the distribution (just + for testing purposes, it doesn't get installed) to help with + this. [Craig Berry and Yitzchak Scott-Thoennes] + - Fix detection of $VERSION expressions that are not assignments. [Spotted by Chris Dolan] Index: MANIFEST =================================================================== RCS file: /cvsroot/module-build/Module-Build/MANIFEST,v retrieving revision 1.51 retrieving revision 1.52 diff -u -d -r1.51 -r1.52 --- MANIFEST 12 Jan 2006 23:45:17 -0000 1.51 +++ MANIFEST 25 Feb 2006 15:27:26 -0000 1.52 @@ -33,6 +33,7 @@ t/bundled/Test/Builder.pm t/bundled/Test/More.pm t/bundled/Test/Simple.pm +t/bundled/Tie/CPHash.pm t/compat.t t/destinations.t t/ext.t |
From: Ken W. <kwi...@us...> - 2006-02-25 15:27:35
|
Update of /cvsroot/module-build/Module-Build/t/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7643/t/lib Modified Files: DistGen.pm Log Message: Fix for non-case-preserving test stuff on VMS Index: DistGen.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/lib/DistGen.pm,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- DistGen.pm 27 Jan 2006 03:12:25 -0000 1.16 +++ DistGen.pm 25 Feb 2006 15:27:27 -0000 1.17 @@ -14,6 +14,7 @@ use File::Path (); use File::Spec (); use IO::File (); +use Tie::CPHash; sub new { my $package = shift; @@ -29,6 +30,10 @@ ); my $self = bless( \%data, $package ); + tie %{$self->{filedata}}, 'Tie::CPHash'; + + tie %{$self->{pending}{change}}, 'Tie::CPHash'; + if ( -d $self->dirname ) { warn "Warning: Removing existing directory '@{[$self->dirname]}'\n"; $self->remove; @@ -280,16 +285,23 @@ } my %names; + tie %names, 'Tie::CPHash'; foreach my $file ( keys %{$self->{filedata}} ) { my $filename = $self->_real_filename( $file ); my $dirname = File::Basename::dirname( $filename ); $names{$filename} = 0; + print "Splitting '$dirname'\n" if $VERBOSE; my @dirs = File::Spec->splitdir( $dirname ); while ( @dirs ) { - my $dir = File::Spec->catdir( @dirs ); - $names{$dir} = 0; + my $dir = ( scalar(@dirs) == 1 + ? $dirname + : File::Spec->catdir( @dirs ) ); + if (length $dir) { + print "Setting directory name '$dir' in \%names\n" if $VERBOSE; + $names{$dir} = 0; + } pop( @dirs ); } } @@ -297,11 +309,13 @@ File::Find::finddepth( sub { my $name = File::Spec->canonpath( $File::Find::name ); + $name =~ s/\.\z// if $^O eq 'VMS'; + if ( not exists $names{$name} ) { print "Removing '$name'\n" if $VERBOSE; File::Path::rmtree( $_ ); } - }, File::Spec->curdir ); + }, ($^O eq "VMS" ? './' : File::Spec->curdir) ); chdir( $here ); } |
From: Ken W. <kwi...@us...> - 2006-02-25 15:27:32
|
Update of /cvsroot/module-build/Module-Build/t/bundled/Tie In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7643/t/bundled/Tie Added Files: CPHash.pm Log Message: Fix for non-case-preserving test stuff on VMS --- NEW FILE: CPHash.pm --- #--------------------------------------------------------------------- package Tie::CPHash; # # Copyright 1997 Christopher J. Madsen # # Author: Christopher J. Madsen <chr...@ge...> # Created: 08 Nov 1997 # Version: 1.001 (25-Oct-1998) # # This program is free software; you can redistribute it and/or modify # it under the same terms as Perl itself. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the # GNU General Public License or the Artistic License for more details. # # Case preserving but case insensitive hash #--------------------------------------------------------------------- require 5.000; use strict; use vars qw(@ISA $VERSION); @ISA = qw(); #===================================================================== # Package Global Variables: BEGIN { # Convert RCS revision number to d.ddd format: $VERSION = sprintf('%d.%03d', '1.001 ' =~ /(\d+)\.(\d+)/); } # end BEGIN #===================================================================== # Tied Methods: #--------------------------------------------------------------------- # TIEHASH classname # The method invoked by the command `tie %hash, classname'. # Associates a new hash instance with the specified class. sub TIEHASH { bless {}, $_[0]; } # end TIEHASH #--------------------------------------------------------------------- # STORE this, key, value # Store datum *value* into *key* for the tied hash *this*. sub STORE { $_[0]->{lc $_[1]} = [ $_[1], $_[2] ]; } # end STORE #--------------------------------------------------------------------- # FETCH this, key # Retrieve the datum in *key* for the tied hash *this*. sub FETCH { my $v = $_[0]->{lc $_[1]}; ($v ? $v->[1] : undef); } # end FETCH #--------------------------------------------------------------------- # FIRSTKEY this # Return the (key, value) pair for the first key in the hash. sub FIRSTKEY { my $a = scalar keys %{$_[0]}; &NEXTKEY; } # end FIRSTKEY #--------------------------------------------------------------------- # NEXTKEY this, lastkey # Return the next (key, value) pair for the hash. sub NEXTKEY { my $v = (each %{$_[0]})[1]; ($v ? $v->[0] : undef ); } # end NEXTKEY #--------------------------------------------------------------------- # EXISTS this, key # Verify that *key* exists with the tied hash *this*. sub EXISTS { exists $_[0]->{lc $_[1]}; } # end EXISTS #--------------------------------------------------------------------- # DELETE this, key # Delete the key *key* from the tied hash *this*. # Returns the old value, or undef if it didn't exist. sub DELETE { my $v = delete $_[0]->{lc $_[1]}; ($v ? $v->[1] : undef); } # end DELETE #--------------------------------------------------------------------- # CLEAR this # Clear all values from the tied hash *this*. sub CLEAR { %{$_[0]} = (); } # end CLEAR #===================================================================== # Other Methods: #--------------------------------------------------------------------- # Return the case of KEY. sub key { my $v = $_[0]->{lc $_[1]}; ($v ? $v->[0] : undef); } #===================================================================== # Package Return Value: 1; __END__ =head1 NAME Tie::CPHash - Case preserving but case insensitive hash table =head1 SYNOPSIS require Tie::CPHash; tie %cphash, 'Tie::CPHash'; $cphash{'Hello World'} = 'Hi there!'; printf("The key `%s' was used to store `%s'.\n", tied(%cphash)->key('HELLO WORLD'), $cphash{'HELLO world'}); =head1 DESCRIPTION The B<Tie::CPHash> provides a hash table that is case preserving but case insensitive. This means that $cphash{KEY} $cphash{key} $cphash{Key} $cphash{keY} all refer to the same entry. Also, the hash remembers which form of the key was last used to store the entry. The C<keys> and C<each> functions will return the key that was used to set the value. An example should make this clear: tie %h, 'Tie::CPHash'; $h{Hello} = 'World'; print $h{HELLO}; # Prints 'World' print keys(%h); # Prints 'Hello' $h{HELLO} = 'WORLD'; print $h{hello}; # Prints 'WORLD' print keys(%h); # Prints 'HELLO' The additional C<key> method lets you fetch the case of a specific key: # When run after the previous example, this prints 'HELLO': print tied(%h)->key('Hello'); (The C<tied> function returns the object that C<%h> is tied to.) If you need a case insensitive hash, but don't need to preserve case, just use C<$hash{lc $key}> instead of C<$hash{$key}>. This has a lot less overhead than B<Tie::CPHash>. =head1 AUTHOR Christopher J. Madsen E<lt>F<chr...@ge...>E<gt> =cut # Local Variables: # tmtrack-file-task: "Tie::CPHash.pm" # End: |
From: Ken W. <kwi...@us...> - 2006-02-25 15:17:50
|
Update of /cvsroot/module-build/Module-Build/t/bundled/Tie In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3087/t/bundled/Tie Log Message: Directory /cvsroot/module-build/Module-Build/t/bundled/Tie added to the repository |
From: Randy W. S. <si...@us...> - 2006-02-25 03:51:34
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8198 Modified Files: Changes Log Message: Modify add_build_element() so that it only adds elements if they don't already exist. Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.424 retrieving revision 1.425 diff -u -d -r1.424 -r1.425 --- Changes 21 Feb 2006 09:06:11 -0000 1.424 +++ Changes 25 Feb 2006 03:51:27 -0000 1.425 @@ -2,6 +2,9 @@ 0.27_08 + - Modify add_build_element() so that it only adds elements if they + don't already exist. [David Wheeler] + - Fix detection of $VERSION expressions that are not assignments. [Spotted by Chris Dolan] |
From: Randy W. S. <si...@us...> - 2006-02-25 03:51:34
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8198/t Modified Files: extend.t Log Message: Modify add_build_element() so that it only adds elements if they don't already exist. Index: extend.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/extend.t,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- extend.t 9 Jan 2006 01:18:15 -0000 1.22 +++ extend.t 25 Feb 2006 03:51:28 -0000 1.23 @@ -2,7 +2,7 @@ use strict; use lib $ENV{PERL_CORE} ? '../lib/Module/Build/t/lib' : 't/lib'; -use MBTest tests => 52; +use MBTest tests => 53; use Cwd (); my $cwd = Cwd::cwd; @@ -78,6 +78,10 @@ ok $mb; $mb->add_build_element('foo'); + $mb->add_build_element('foo'); + is_deeply $mb->build_elements, [qw(PL support pm xs pod script foo)], + 'The foo element should be in build_elements only once'; + $mb->dispatch('build'); ok -e File::Spec->catfile($mb->blib, 'lib', 'test.foo'); |
From: Randy W. S. <si...@us...> - 2006-02-25 03:51:34
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8198/lib/Module/Build Modified Files: Base.pm Log Message: Modify add_build_element() so that it only adds elements if they don't already exist. Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.548 retrieving revision 1.549 diff -u -d -r1.548 -r1.549 --- Base.pm 23 Feb 2006 04:03:51 -0000 1.548 +++ Base.pm 25 Feb 2006 03:51:27 -0000 1.549 @@ -449,8 +449,9 @@ sub add_build_element { - my $self = shift; - push @{$self->build_elements}, shift; + my ($self, $elem) = @_; + my $elems = $self->build_elements; + push @$elems, $elem unless grep { $_ eq $elem } @$elems; } sub ACTION_config_data { |
From: Randy W. S. <si...@us...> - 2006-02-23 04:03:55
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build/Platform In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27370/lib/Module/Build/Platform Modified Files: Windows.pm Log Message: The command to delete 'Build.bat' did not work on Win9x because the syntax differs between Win9x and WinNT variants. We now use the appropriate syntax based on Win32::GetOSVersion(). The user can invoke the 'realclean' action with either of 'Build realclean' (the batch script) or 'perl Build realclean'. We need to know which one was used, so we customize the use of the 'pl2bat' utility to append a special option, '--batch_bat', to the command line in the batch script. Based on the presence of this option we use an appropriate method of removing 'Build.bat'. Index: Windows.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Platform/Windows.pm,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- Windows.pm 21 Feb 2006 02:22:56 -0000 1.29 +++ Windows.pm 23 Feb 2006 04:03:52 -0000 1.30 @@ -38,7 +38,7 @@ } else { @potential_dirs = map { File::Spec->canonpath($_) } @${cf}{qw(installscript installbin installsitebin installvendorbin)}, - File::Basename::dirname($self->{properties}{perl}); + File::Basename::dirname($self->perl); } foreach my $dir (@potential_dirs) { @@ -54,44 +54,68 @@ my $self = shift; $self->SUPER::make_executable(@_); + my $perl = $self->perl; + my $pl2bat = $self->{config}{pl2bat}; + my $pl2bat_args = ''; if ( defined($pl2bat) && length($pl2bat) ) { + foreach my $script (@_) { next if $script =~ /\.(bat|cmd)$/i; # already a script; nothing to do (my $script_bat = $script) =~ s/\.plx?$//i; $script_bat .= '.bat'; # MSWin32 executable batch script file extension -# $self->add_to_cleanup($script_bat); # don't do this for $script_bat since it unlinks itself - local $self->{properties}{quiet} = 1 if $self->build_script; # Psst, keep this quiet - my $status = $self->do_system("$self->{properties}{perl} $pl2bat < $script > $script_bat"); + my $quiet_state = $self->{properties}{quiet}; # keep quiet + if ( $script eq $self->build_script ) { + $self->{properties}{quiet} = 1; + $pl2bat_args = + q(-n "-x -S """%0""" "--build_bat" %*" ) . + q(-o "-x -S """%0""" "--build_bat" %1 %2 %3 %4 %5 %6 %7 %8 %9"); + } + + my $status = $self->do_system("$perl $pl2bat $pl2bat_args " . + "< $script > $script_bat"); $self->SUPER::make_executable($script_bat); + + $self->{properties}{quiet} = $quiet_state; # restore quiet } + } else { - warn "Could not find 'pl2bat.bat' utility needed to make scripts executable.\n" - . "Unable to convert scripts ( " . join(', ', @_) . " ) to executables.\n"; + warn <<"EOF"; +Could not find 'pl2bat.bat' utility needed to make scripts executable. +Unable to convert scripts ( @{[join(', ', @_)]} ) to executables. +EOF } } sub ACTION_realclean { my ($self) = @_; - $self->depends_on('clean'); + + $self->SUPER::ACTION_realclean(); my $basename = basename($0); $basename =~ s/(?:\.bat)?$//i; if ( $basename eq $self->build_script ) { - my $full_progname = $0; - $full_progname =~ s/(?:\.bat)?$/.bat/i; + if ( $self->build_bat ) { + my $full_progname = $0; + $full_progname =~ s/(?:\.bat)?$/.bat/i; - my $fh = IO::File->new(">> $basename.bat") or die "Can't create $basename.bat: $!"; - print $fh qq(start "" /min "\%comspec\%" /c del "$full_progname"); # should work for NT variants, possibly 9x - close $fh ; + # Syntax differs between 9x & NT: the later requires a null arg (???) + require Win32; + my $null_arg = (Win32::GetOSVersion == 2) ? '""' : ''; + my $cmd = qq(start $null_arg /min "\%comspec\%" /c del "$full_progname"); + my $fh = IO::File->new(">> $basename.bat") + or die "Can't create $basename.bat: $!"; + print $fh $cmd; + close $fh ; + } else { + $self->delete_filetree($self->build_script . '.bat'); + } } - - $self->delete_filetree($self->config_dir, $self->build_script); } sub manpage_separator { |
From: Randy W. S. <si...@us...> - 2006-02-23 04:03:55
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27370/lib/Module/Build Modified Files: Base.pm Log Message: The command to delete 'Build.bat' did not work on Win9x because the syntax differs between Win9x and WinNT variants. We now use the appropriate syntax based on Win32::GetOSVersion(). The user can invoke the 'realclean' action with either of 'Build realclean' (the batch script) or 'perl Build realclean'. We need to know which one was used, so we customize the use of the 'pl2bat' utility to append a special option, '--batch_bat', to the command line in the batch script. Based on the presence of this option we use an appropriate method of removing 'Build.bat'. Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.547 retrieving revision 1.548 diff -u -d -r1.547 -r1.548 --- Base.pm 21 Feb 2006 02:22:56 -0000 1.547 +++ Base.pm 23 Feb 2006 04:03:51 -0000 1.548 @@ -604,6 +604,7 @@ __PACKAGE__->add_property(build_class => 'Module::Build'); __PACKAGE__->add_property(build_elements => [qw(PL support pm xs pod script)]); __PACKAGE__->add_property(build_script => 'Build'); +__PACKAGE__->add_property(build_bat => 0); __PACKAGE__->add_property(config_dir => '_build'); __PACKAGE__->add_property(include_dirs => []); __PACKAGE__->add_property(installdirs => 'site'); @@ -1415,6 +1416,7 @@ $opt = $self->_translate_option($opt); my @bool_opts = qw( + build_bat create_readme pollute quiet |