module-build-checkins Mailing List for Module::Build (Page 28)
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-06-08 03:50:15
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25400 Modified Files: Changes Log Message: Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.345 retrieving revision 1.346 diff -u -d -r1.345 -r1.346 --- Changes 7 Jun 2005 21:47:13 -0000 1.345 +++ Changes 8 Jun 2005 03:50:03 -0000 1.346 @@ -27,7 +27,9 @@ by Yves] - We now use Pod::Readme instead of Pod::Text to generate the README - file when the 'create_readme' option is used. [Robert Rothenberg] + file when the 'create_readme' option is used. The disadvantage is + that it's not a core module, but the advantages are pretty nice. + [Robert Rothenberg] 0.27_01 (Beta for 0.28) Fri Apr 15 21:12:57 CDT 2005 |
|
From: Ken W. <kwi...@us...> - 2005-06-08 03:48:15
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24349/t Modified Files: destinations.t Log Message: Fix some testing errors when prefix is '/' Index: destinations.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/destinations.t,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- destinations.t 7 Jun 2005 03:34:22 -0000 1.1 +++ destinations.t 8 Jun 2005 03:48:06 -0000 1.2 @@ -63,25 +63,31 @@ $m->prefix( $prefix ); ok( $m->{properties}{prefix} eq $prefix ); -my $test_val; +my $c = \%Config; -($test_val = $Config{installsitelib}) =~ s!\Q$site_prefix\E\b!$prefix!; -ok( $m->install_destination( 'lib' ), $test_val ); +my $naive_prefix = sub { + my ($path) = @_; + (my $bare = $path) =~ s!^\Q$site_prefix\E\b!!; + return catdir($prefix, $bare); +}; -($test_val = $Config{installsitearch}) =~ s!\Q$site_prefix\E\b!$prefix!; -ok( $m->install_destination( 'arch' ), $test_val ); +ok( $m->install_destination( 'lib' ), + $naive_prefix->($c->{installsitelib}) ); -($test_val = $Config{installsitebin}) =~ s!\Q$site_prefix\E\b!$prefix!; -ok( $m->install_destination( 'bin' ), $test_val ); +ok( $m->install_destination( 'arch' ), + $naive_prefix->($c->{installsitearch}) ); -($test_val = $Config{installscript}) =~ s!\Q$site_prefix\E\b!$prefix!; -ok( $m->install_destination( 'script' ), $test_val ); +ok( $m->install_destination( 'bin' ), + $naive_prefix->($c->{installsitebin}) ); -($test_val = $Config{installsiteman1dir}) =~ s!\Q$site_prefix\E\b!$prefix!; -ok( $m->install_destination( 'bindoc' ), $test_val ); +ok( $m->install_destination( 'script' ), + $naive_prefix->($c->{installscript}) ); -($test_val = $Config{installsiteman3dir}) =~ s!\Q$site_prefix\E\b!$prefix!; -ok( $m->install_destination( 'libdoc' ), $test_val ); +ok( $m->install_destination( 'bindoc' ), + $naive_prefix->($c->{installsiteman1dir} || $c->{installman1dir}) ); + +ok( $m->install_destination( 'libdoc' ), + $naive_prefix->($c->{installsiteman3dir} || $c->{installman3dir})); $m->install_base( $install_base ); |
|
From: Ken W. <kwi...@us...> - 2005-06-07 21:47:55
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12128/lib/Module/Build Modified Files: Compat.pm Log Message: No need to die when we see PREFIX anymore Index: Compat.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Compat.pm,v retrieving revision 1.61 retrieving revision 1.62 diff -u -d -r1.61 -r1.62 --- Compat.pm 14 Apr 2005 02:49:12 -0000 1.61 +++ Compat.pm 7 Jun 2005 21:47:47 -0000 1.62 @@ -17,8 +17,6 @@ INC => sub { map {('--extra_compiler_flags', "-I$_")} Module::Build->split_like_shell(shift) }, POLLUTE => sub { ('--extra_compiler_flags', '-DPERL_POLLUTE') }, INSTALLDIRS => sub {local $_ = shift; 'installdirs=' . (/^perl$/ ? 'core' : $_) }, - PREFIX => sub {die "Sorry, PREFIX is not supported. See the Module::Build\n". - "documentation for 'destdir' or 'install_base' instead.\n"}, LIB => sub { ('--install_path', 'lib='.shift()) }, ); |
|
From: Ken W. <kwi...@us...> - 2005-06-07 21:47:21
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11796 Modified Files: Changes Log Message: Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.344 retrieving revision 1.345 diff -u -d -r1.344 -r1.345 --- Changes 7 Jun 2005 21:40:11 -0000 1.344 +++ Changes 7 Jun 2005 21:47:13 -0000 1.345 @@ -2,6 +2,14 @@ 0.27_02 + - Provided initial support for the --prefix installation parameter, + which acts like MakeMaker's PREFIX. It is still highly recommended + NOT to use it when you could reasonably use --install_base or + --install_path or --install_dest, but that's just because the way + --prefix is designed is weird and unpredictable. Ultimately the + choice rests with the installing user. [Patches by Michael Schwern + and Rob Kinyon] + - Fixed a bug in subclass() which prevented people from using it to subclass subclasses of Module::Build. [Chris Dolan] |
|
From: Ken W. <kwi...@us...> - 2005-06-07 21:40:20
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7304 Modified Files: Build.PL Changes Log Message: Use Pod::Readme instead of Pod::Text to generate README Index: Build.PL =================================================================== RCS file: /cvsroot/module-build/Module-Build/Build.PL,v retrieving revision 1.53 retrieving revision 1.54 diff -u -d -r1.53 -r1.54 --- Build.PL 6 Feb 2005 13:33:44 -0000 1.53 +++ Build.PL 7 Jun 2005 21:40:11 -0000 1.54 @@ -39,7 +39,7 @@ 'Archive::Tar' => '1.08', 'ExtUtils::Install' => 0.30, 'ExtUtils::ParseXS' => 2.02, - 'Pod::Text' => 0, + 'Pod::Readme' => 0.04, 'Module::Signature' => 0.21, }, build_requires => { Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.343 retrieving revision 1.344 diff -u -d -r1.343 -r1.344 --- Changes 3 Jun 2005 16:50:37 -0000 1.343 +++ Changes 7 Jun 2005 21:40:11 -0000 1.344 @@ -18,6 +18,9 @@ places, and help people not to panic when they look at it. [Spotted by Yves] + - We now use Pod::Readme instead of Pod::Text to generate the README + file when the 'create_readme' option is used. [Robert Rothenberg] + 0.27_01 (Beta for 0.28) Fri Apr 15 21:12:57 CDT 2005 Backward-incompatible (but better) changes: |
|
From: Ken W. <kwi...@us...> - 2005-06-07 21:40:20
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7304/lib/Module/Build Modified Files: Base.pm Log Message: Use Pod::Readme instead of Pod::Text to generate README Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.418 retrieving revision 1.419 diff -u -d -r1.418 -r1.419 --- Base.pm 7 Jun 2005 03:34:07 -0000 1.418 +++ Base.pm 7 Jun 2005 21:40:11 -0000 1.419 @@ -2176,8 +2176,8 @@ sub do_create_readme { my $self = shift; - require Pod::Text; - my $parser = Pod::Text->new; + require Pod::Readme; + my $parser = Pod::Readme->new; $parser->parse_from_file($self->dist_version_from, 'README', @_); $self->_add_to_manifest('MANIFEST', 'README'); } |
|
From: Ken W. <kwi...@us...> - 2005-06-07 03:34:48
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28385/lib/Module/Build Modified Files: Base.pm Notes.pm Log Message: First stab at --prefix support Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.417 retrieving revision 1.418 diff -u -d -r1.417 -r1.418 --- Base.pm 3 Jun 2005 16:50:38 -0000 1.417 +++ Base.pm 7 Jun 2005 03:34:07 -0000 1.418 @@ -510,6 +510,7 @@ ignore_prereq_requires ignore_prereqs skip_rcfile + prefix ); { @@ -2536,12 +2537,90 @@ return File::Spec->catdir(@{$map{$type}}); } + +# Translated from ExtUtils::MM_Any::init_INSTALL_from_PREFIX +sub install_prefix_relative { + my ($self, $type, $prefix) = @_; + my $c = $self->{config}; + + my %map = ( + core => { + lib => $c->{installprivlib}, + arch => $c->{installarchlib}, + bin => $c->{installbin}, + script => $c->{installscript}, + bindoc => $c->{installman1dir}, + libdoc => $c->{installman3dir}, + }, + + site => { + lib => $c->{installsitelib}, + arch => $c->{installsitearch}, + bin => $c->{installsitebin}, + script => $c->{installscript}, + bindoc => $c->{installsiteman1dir}, + libdoc => $c->{installsiteman3dir}, + }, + + vendor => { + lib => $c->{installvendorlib}, + arch => $c->{installvendorarch}, + bin => $c->{installvendorbin}, + script => $c->{installscript}, + bindoc => $c->{installvendorman1dir}, + libdoc => $c->{installvendorman3dir}, + }, + ); + + my $installdirs = $self->installdirs; + return unless exists $map{$installdirs}{$type}; + + my %prefixes = ( + core => $Config{installprefixexp} || $Config{installprefix} || + $Config{prefixexp} || $Config{prefix} || '', + site => $Config{siteprefixexp}, + vendor => $Config{usevendorprefix} ? $Config{vendorprefixexp} : '', + ); + $prefixes{site} ||= $prefixes{core}; + + return $self->prefixify($map{$installdirs}{$type}, $prefixes{$installdirs}, $prefix); +} + + +# Translated from ExtUtils::MM_Unix::prefixify() +sub prefixify { + my($self, $path, $sprefix, $rprefix) = @_; + + $rprefix .= '/' if $sprefix =~ m|/$|; + + $self->log_verbose(" prefixify $path from $sprefix to $rprefix\n"); + + if( length $path == 0 ) { + $self->log_verbose(" no path to prefixify.\n") + } + elsif( !File::Spec->file_name_is_absolute($path) ) { + $self->log_verbose(" path is relative, not prefixifying.\n"); + } + elsif( $sprefix eq $rprefix ) { + $self->log_verbose(" no new prefix.\n"); + } + elsif( $path !~ s{^\Q$sprefix\E\b}{$rprefix}s ) { + $self->log_verbose(" cannot prefixify.\n"); + } + + $self->log_verbose(" now $path\n"); + + return $path; +} + + sub install_destination { my ($self, $type) = @_; my $p = $self->{properties}; return $p->{install_path}{$type} if exists $p->{install_path}{$type}; return File::Spec->catdir($p->{install_base}, $self->install_base_relative($type)) if $p->{install_base}; + return $self->install_prefix_relative($type, $p->{prefix}) if $p->{prefix}; return $p->{install_sets}{ $p->{installdirs} }{$type}; } Index: Notes.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Notes.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Notes.pm 15 Apr 2005 22:59:05 -0000 1.6 +++ Notes.pm 7 Jun 2005 03:34:07 -0000 1.7 @@ -76,7 +76,7 @@ foreach my $key (keys %{ $self->{new} }) { next if ref $self->{new}{$key}; next if ref $self->{disk}{$key} or !exists $self->{disk}{$key}; - delete $self->{new}{$key} if $self->{new}{$key} eq $self->{disk}{$key}; + delete $self->{new}{$key} if ($self->{new}{$key}||'') eq ($self->{disk}{$key}||''); } if (my $file = $self->{file}) { |
|
From: Ken W. <kwi...@us...> - 2005-06-07 03:34:31
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build/Platform In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28385/lib/Module/Build/Platform Modified Files: VMS.pm Log Message: First stab at --prefix support Index: VMS.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Platform/VMS.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- VMS.pm 10 Oct 2004 04:39:34 -0000 1.6 +++ VMS.pm 7 Jun 2005 03:34:07 -0000 1.7 @@ -61,8 +61,6 @@ Use '__' instead of '::'. -=back - =cut sub manpage_separator { @@ -70,6 +68,70 @@ } +=item prefixify + +Prefixify taking into account VMS' filepath syntax. + +=cut + +# Translated from ExtUtils::MM_VMS::prefixify() +sub prefixify { + my($self, $path, $sprefix, $rprefix) = @_; + + $self->log_verbose(" prefixify $path from $sprefix to $rprefix\n"); + + # Translate $(PERLPREFIX) to a real path. + $rprefix = $self->eliminate_macros($rprefix); + $rprefix = VMS::Filespec::vmspath($rprefix) if $rprefix; + $sprefix = VMS::Filespec::vmspath($sprefix) if $sprefix; + + $self->log_verbose(" rprefix translated to $rprefix\n". + " sprefix translated to $sprefix\n"); + + if( length $path == 0 ) { + $self->log_verbose(" no path to prefixify.\n") + } + elsif( !File::Spec->file_name_is_absolute($path) ) { + $self->log_verbose(" path is relative, not prefixifying.\n"); + } + elsif( $sprefix eq $rprefix ) { + $self->log_verbose(" no new prefix.\n"); + } + else { + my($path_vol, $path_dirs) = File::Spec->splitpath( $path ); + if( $path_vol eq $Config{vms_prefix}.':' ) { + $self->log_verbose(" $Config{vms_prefix}: seen\n"); + + $path_dirs =~ s{^\[}{\[.} unless $path_dirs =~ m{^\[\.}; + $path = $self->_catprefix($rprefix, $path_dirs); + } + } + + $self->log_verbose(" now $path\n"); + + return $path; +} + + +# From ExtUtils::MM_VMS::_catpreifx() +sub _catprefix { + my($self, $rprefix, $default) = @_; + + my($rvol, $rdirs) = File::Spec->splitpath($rprefix); + if( $rvol ) { + return File::Spec->catpath($rvol, + File::Spec->catdir($rdirs, $default), + '' + ) + } + else { + return File::Spec->catdir($rdirs, $default); + } +} + + +=back + =head1 AUTHOR Michael G Schwern <sc...@po...>, Ken Williams <ke...@ma...> |
|
From: Ken W. <kwi...@us...> - 2005-06-07 03:34:31
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28385/t Added Files: destinations.t Log Message: First stab at --prefix support --- NEW FILE: destinations.t --- use strict; use Test; BEGIN { plan tests => 32 } use Module::Build; ok(1); use Config; use File::Spec::Functions qw( catdir ); #use File::Spec; # #my $common_pl = File::Spec->catfile('t', 'common.pl'); #require $common_pl; ok( $INC{'Module/Build.pm'}, '/blib/', "Make sure Module::Build was loaded from blib/"); my $m = Module::Build->current; ok( UNIVERSAL::isa( $m, 'Module::Build::Base' ) ); ok( !defined $m->install_base ); ok( !defined $m->prefix ); # Do default tests here ok( $m->install_destination( 'lib' ), $Config{ installsitelib } ); ok( $m->install_destination( 'arch' ), $Config{ installsitearch } ); ok( $m->install_destination( 'bin' ), $Config{ installsitebin } || $Config{ installbin } ); ok( $m->install_destination( 'script' ), $Config{ installsitescript } || $Config{ installsitebin } || $Config{ installscript } ); ok( $m->install_destination( 'bindoc' ), $Config{ installsiteman1dir } || $Config{ installman1dir } ); ok( $m->install_destination( 'libdoc' ), $Config{ installsiteman3dir } || $Config{ installman3dir } ); my $install_base = catdir( 'foo', 'bar' ); $m->install_base( $install_base ); ok( !defined $m->prefix ); ok( $m->install_destination( 'lib' ), catdir( $install_base, 'lib', 'perl5' ) ); ok( $m->install_destination( 'arch' ), catdir( $install_base, 'lib', 'perl5', $Config{archname} ) ); ok( $m->install_destination( 'bin' ), catdir( $install_base, 'bin' ) ); ok( $m->install_destination( 'script' ), catdir( $install_base, 'bin' ) ); ok( $m->install_destination( 'bindoc' ), catdir( $install_base, 'man', 'man1') ); ok( $m->install_destination( 'libdoc' ), catdir( $install_base, 'man', 'man3' ) ); $m->install_base( undef ); ok( !defined $m->install_base ); ##### Adaptation START # Adapted from ExtUtils::MakeMaker::MM_Any::init_INSTALL_from_PREFIX() my $core_prefix = $Config{installprefixexp} || $Config{installprefix} || $Config{prefixexp} || $Config{prefix} || ''; my $vend_prefix = $Config{usevendorprefix} ? $Config{vendorprefixexp} : ''; my $site_prefix = $Config{siteprefixexp} || $core_prefix; my $libstyle = $Config{installstyle} || 'lib/perl5'; my $manstyle = $libstyle eq 'lib/perl5' ? $libstyle : ''; ##### Adaptation END my $prefix = catdir( qw( some prefix ) ); $m->prefix( $prefix ); ok( $m->{properties}{prefix} eq $prefix ); my $test_val; ($test_val = $Config{installsitelib}) =~ s!\Q$site_prefix\E\b!$prefix!; ok( $m->install_destination( 'lib' ), $test_val ); ($test_val = $Config{installsitearch}) =~ s!\Q$site_prefix\E\b!$prefix!; ok( $m->install_destination( 'arch' ), $test_val ); ($test_val = $Config{installsitebin}) =~ s!\Q$site_prefix\E\b!$prefix!; ok( $m->install_destination( 'bin' ), $test_val ); ($test_val = $Config{installscript}) =~ s!\Q$site_prefix\E\b!$prefix!; ok( $m->install_destination( 'script' ), $test_val ); ($test_val = $Config{installsiteman1dir}) =~ s!\Q$site_prefix\E\b!$prefix!; ok( $m->install_destination( 'bindoc' ), $test_val ); ($test_val = $Config{installsiteman3dir}) =~ s!\Q$site_prefix\E\b!$prefix!; ok( $m->install_destination( 'libdoc' ), $test_val ); $m->install_base( $install_base ); ok( $m->install_destination( 'lib' ), catdir( $install_base, 'lib', 'perl5' ) ); ok( $m->install_destination( 'arch' ), catdir( $install_base, 'lib', 'perl5', $Config{archname} ) ); ok( $m->install_destination( 'bin' ), catdir( $install_base, 'bin' ) ); ok( $m->install_destination( 'script' ), catdir( $install_base, 'bin' ) ); ok( $m->install_destination( 'bindoc' ), catdir( $install_base, 'man', 'man1') ); ok( $m->install_destination( 'libdoc' ), catdir( $install_base, 'man', 'man3' ) ); |
|
From: Ken W. <kwi...@us...> - 2005-06-03 16:50:52
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11765/lib/Module/Build Modified Files: Base.pm Log Message: Remove hard-coded File::Spec::Unix references Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.416 retrieving revision 1.417 diff -u -d -r1.416 -r1.417 --- Base.pm 21 Apr 2005 01:59:55 -0000 1.416 +++ Base.pm 3 Jun 2005 16:50:38 -0000 1.417 @@ -1873,7 +1873,7 @@ map [File::Spec->catdir($self->blib, $_), $_], qw( script lib ); - my $htmldir = File::Spec::Unix->catdir($self->blib, 'html'); + my $htmldir = File::Spec->catdir($self->blib, 'html'); unless (-d $htmldir) { File::Path::mkpath($htmldir, 0, 0755) or die "Couldn't mkdir $htmldir: $!"; } @@ -1895,9 +1895,9 @@ my @dirs = File::Spec->splitdir( File::Spec->canonpath( $path ) ); pop( @dirs ) if $dirs[-1] eq File::Spec->curdir; - my $fulldir = File::Spec::Unix->catfile($htmldir, @rootdirs, @dirs); - my $outfile = File::Spec::Unix->catfile($fulldir, $name . '.html'); - my $infile = File::Spec::Unix->abs2rel($pod); + my $fulldir = File::Spec->catfile($htmldir, @rootdirs, @dirs); + my $outfile = File::Spec->catfile($fulldir, $name . '.html'); + my $infile = File::Spec->abs2rel($pod); return if $self->up_to_date($infile, $outfile); @@ -1907,7 +1907,7 @@ } my $path2root = "../" x (@rootdirs+@dirs); - my $htmlroot = File::Spec::Unix->catdir($path2root, 'site'); + my $htmlroot = "$path2root/site"; my $title = join('::', (@dirs, $name)); { |
|
From: Ken W. <kwi...@us...> - 2005-06-03 16:50:46
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11765 Modified Files: Changes Log Message: Remove hard-coded File::Spec::Unix references Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.342 retrieving revision 1.343 diff -u -d -r1.342 -r1.343 --- Changes 17 May 2005 01:11:13 -0000 1.342 +++ Changes 3 Jun 2005 16:50:37 -0000 1.343 @@ -13,6 +13,11 @@ - Note several options for automatically creating a new module dev tree. [Suggested by Eric Wilhelm] + - Removed some hard-coded references to File::Spec::Unix in the + creation of HTML docs, which should help that code work in more + places, and help people not to panic when they look at it. [Spotted + by Yves] + 0.27_01 (Beta for 0.28) Fri Apr 15 21:12:57 CDT 2005 Backward-incompatible (but better) changes: |
|
From: Ken W. <kwi...@us...> - 2005-06-03 16:40:47
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7106 Modified Files: Tag: release-0_26_branch Changes Log Message: Fix the shebang line output Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.299.2.46 retrieving revision 1.299.2.47 diff -u -d -r1.299.2.46 -r1.299.2.47 --- Changes 15 Apr 2005 13:25:34 -0000 1.299.2.46 +++ Changes 3 Jun 2005 16:39:50 -0000 1.299.2.47 @@ -1,5 +1,10 @@ Revision history for Perl extension Module::Build. +0.2611 + + - Fix the output of an informational message that we output when + changing the 'shebang line' in installable scripts. [Robin Barker] + 0.2610 Fri Apr 15 08:25:01 CDT 2005 - new_from_context() was losing its arguments in some cases (and not |
|
From: Ken W. <kwi...@us...> - 2005-06-03 16:40:19
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7106/lib/Module/Build Modified Files: Tag: release-0_26_branch Base.pm Log Message: Fix the shebang line output Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.340.2.30 retrieving revision 1.340.2.31 diff -u -d -r1.340.2.30 -r1.340.2.31 --- Base.pm 23 Mar 2005 01:26:23 -0000 1.340.2.30 +++ Base.pm 3 Jun 2005 16:40:04 -0000 1.340.2.31 @@ -1616,7 +1616,7 @@ next unless $cmd =~ /perl/i; my $interpreter = $self->{properties}{perl}; - print STDOUT "Changing sharpbang in $file to $interpreter" if $self->{verbose}; + print STDOUT "Changing sharpbang in $file to $interpreter\n" if $self->verbose; my $shb = ''; $shb .= "$c->{sharpbang}$interpreter $arg\n" if $does_shbang; |
|
From: Ken W. <kwi...@us...> - 2005-05-17 01:11:36
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9852 Modified Files: Changes Log Message: Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.341 retrieving revision 1.342 diff -u -d -r1.341 -r1.342 --- Changes 21 Apr 2005 01:59:54 -0000 1.341 +++ Changes 17 May 2005 01:11:13 -0000 1.342 @@ -8,6 +8,10 @@ - Added a 'pure_install' action, which for the time being is identical to the 'install' action. [Jos Boumans] + - Fixed a POD error in a L<http://...> tag. [Offer Kaye] + + - Note several options for automatically creating a new module dev + tree. [Suggested by Eric Wilhelm] 0.27_01 (Beta for 0.28) Fri Apr 15 21:12:57 CDT 2005 |
|
From: Ken W. <kwi...@us...> - 2005-05-05 17:20:59
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19799/lib/Module/Build Modified Files: Authoring.pod Log Message: Note several options for creating dev trees Index: Authoring.pod =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Authoring.pod,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- Authoring.pod 10 Apr 2005 17:46:46 -0000 1.8 +++ Authoring.pod 5 May 2005 17:20:39 -0000 1.9 @@ -1251,6 +1251,20 @@ See also the documentation for the C<subclass()> method. +=head1 STARTING MODULE DEVELOPMENT + +When starting development on a new module, it's rarely worth your time +to create a tree of all the files by hand. Some automatic +module-creators are available: the oldest is C<h2xs>, which has +shipped with perl itself for a long time. Its name reflects the fact +that modules were originally conceived of as a way to wrap up a C +library (thus the C<h> part) into perl extensions (thus the C<xs> +part). + +These days, C<h2xs> has largely been superseded by modules like +C<ExtUtils::ModuleMaker>, C<Module::Starter>, and C<Module::Maker>. +They have varying degrees of support for C<Module::Build>. + =head1 MIGRATION |
|
From: Randy W. S. <si...@us...> - 2005-04-23 12:00:23
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10931/t Modified Files: moduleinfo.t Log Message: Correct some edge cases and update tests accordingly. Also, updated tests with descriptions. Index: moduleinfo.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/moduleinfo.t,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- moduleinfo.t 15 Apr 2005 03:10:53 -0000 1.5 +++ moduleinfo.t 23 Apr 2005 12:00:14 -0000 1.6 @@ -10,7 +10,7 @@ use Test::More; BEGIN { - plan tests => 27; + plan tests => 33; chdir( 't' ) if -d 't'; @@ -18,41 +18,39 @@ require DistGen; } -use Module::Build::ModuleInfo; -ok(1); - +use_ok( 'Module::Build::ModuleInfo' ); # class method C<find_module_by_name> my $module = Module::Build::ModuleInfo->find_module_by_name( 'Module::Build::ModuleInfo' ); -ok( -e $module ); +ok( -e $module, 'find_module_by_name() succeeds' ); # fail on invalid module name -my $pm_info = Module::Build::ModuleInfo->new_from_module( 'Foo::Bar' ); -ok( !defined( $pm_info ) ); +my $pm_info = Module::Build::ModuleInfo->new_from_module( + 'Foo::Bar', inc => [] ); +ok( !defined( $pm_info ), 'fail if can\'t find module by module name' ); # fail on invalid filename my $file = File::Spec->catfile( 'Foo', 'Bar.pm' ); -$pm_info = Module::Build::ModuleInfo->new_from_file( $file ); -ok( !defined( $pm_info ) ); +$pm_info = Module::Build::ModuleInfo->new_from_file( $file, inc => [] ); +ok( !defined( $pm_info ), 'fail if can\'t find module by file name' ); -my $dist = DistGen->new(); -$dist->regen(); +my $dist = DistGen->new; +$dist->regen; # construct from module filename $file = File::Spec->catfile( $dist->dirname, 'lib', 'Simple.pm' ); -$pm_info = - Module::Build::ModuleInfo->new_from_file( $file ); -ok( defined( $pm_info ) ); +$pm_info = Module::Build::ModuleInfo->new_from_file( $file ); +ok( defined( $pm_info ), 'new_from_file() succeeds' ); # construct from module name, using custom include path my $inc = File::Spec->catdir( qw( Simple lib ) ); $pm_info = Module::Build::ModuleInfo->new_from_module( 'Simple', inc => [ $inc, @INC ] ); -ok( defined( $pm_info ) ); +ok( defined( $pm_info ), 'new_from_module() succeeds' ); # parse various module $VERSION lines @@ -60,49 +58,92 @@ <<'---', # declared & defined on same line with 'our' package Simple; our $VERSION = '1.23'; -1; --- <<'---', # declared & defined on seperate lines with 'our' package Simple; our $VERSION; $VERSION = '1.23'; -1; --- <<'---', # use vars package Simple; use vars qw( $VERSION ); $VERSION = '1.23'; -1; --- <<'---', # choose the right default package based on package/file name package Simple::_private; $VERSION = '0'; -1; package Simple; $VERSION = '1.23'; # this should be chosen for version -1; --- <<'---', # just read the first $VERSION line package Simple; $VERSION = '1.23'; # we should see this line $VERSION = eval $VERSION; # and ignore this one -1; +--- + <<'---', # just read the first $VERSION line in reopened package (1) +package Simple; +$VERSION = '1.23'; +package Error::Simple; +$VERSION = '2.34'; +package Simple; +--- + <<'---', # just read the first $VERSION line in reopened package (2) +package Simple; +package Error::Simple; +$VERSION = '2.34'; +package Simple; +$VERSION = '1.23'; --- ); -$dist = DistGen->new(); +$file = File::Spec->catfile( $dist->dirname, 'lib', 'Simple.pm' ); +my( $i, $n ) = ( 1, scalar( @modules ) ); foreach my $module ( @modules ) { SKIP: { skip "No our() support until perl 5.6", 1 if $] < 5.006 && $module =~ /\bour\b/; $dist->change_file( 'lib/Simple.pm', $module ); - $dist->regen( clean => 1 ); - $file = File::Spec->catfile( $dist->dirname, 'lib', 'Simple.pm' ); + $dist->regen; my $pm_info = Module::Build::ModuleInfo->new_from_file( $file ); - is( $pm_info->version, '1.23' ); + is( $pm_info->version, '1.23', + "correct module version ($i of $n)" ); + $i++; } } -$dist->remove(); +$dist->remove; + + +# Find each package only once +$dist->change_file( 'lib/Simple.pm', <<'---' ); +package Simple; +$VERSION = '1.23'; +package Error::Simple; +$VERSION = '2.34'; +package Simple; +--- + +$dist->regen; + +$pm_info = Module::Build::ModuleInfo->new_from_file( $file ); + +my @packages = $pm_info->packages_inside; +is( @packages, 2, 'record only one occurence of each package' ); + + +# Module 'Simple.pm' does not contain package 'Simple'; +# constructor should not complain, no default module name or version +$dist->change_file( 'lib/Simple.pm', <<'---' ); +package Simple::Not; +$VERSION = '1.23'; +--- + +$dist->regen; +$pm_info = Module::Build::ModuleInfo->new_from_file( $file ); + +is( $pm_info->name, undef, 'no default package' ); +is( $pm_info->version, undef, 'no version w/o default package' ); + +$dist->remove; # parse $VERSION lines scripts for package main @@ -127,36 +168,32 @@ $VERSION = '0.01'; package _private; $VERSION = '999'; -1; --- <<'---', # 2nd declared package #!perl -w package _private; $VERSION = '999'; -1; package main; $VERSION = '0.01'; --- <<'---', # split package #!perl -w package main; -1; package _private; $VERSION = '999'; -1; package main; $VERSION = '0.01'; -1; --- ); -$dist = DistGen->new(); +( $i, $n ) = ( 1, scalar( @scripts ) ); foreach my $script ( @scripts ) { $dist->change_file( 'bin/simple.plx', $script ); - $dist->regen(); + $dist->regen; $pm_info = Module::Build::ModuleInfo->new_from_file( 'Simple/bin/simple.plx' ); - ok( defined( $pm_info ) && $pm_info->version eq '0.01' ); + is( $pm_info->version, '0.01', "correct script version ($i of $n)" ); + $i++; } @@ -164,10 +201,8 @@ $dist->change_file( 'lib/Simple.pm', <<'---' ); package Simple; $VERSION = '0.01'; -1; package Simple::Ex; $VERSION = '0.02'; -1; =head1 NAME Simple - It's easy. @@ -178,47 +213,50 @@ =cut --- -$dist->regen(); +$dist->regen; $pm_info = Module::Build::ModuleInfo->new_from_module( 'Simple', inc => [ $inc, @INC ] ); -is( $pm_info->name(), 'Simple' ); +is( $pm_info->name, 'Simple', 'found default package' ); -is( $pm_info->version(), '0.01' ); +is( $pm_info->version, '0.01', 'version for default package' ); # got correct version for secondary package -is( $pm_info->version( 'Simple::Ex' ), '0.02' ); +is( $pm_info->version( 'Simple::Ex' ), '0.02', + 'version for secondary package' ); -my $filename = $pm_info->filename(); -ok( defined( $filename ) && length( $filename ) ); +my $filename = $pm_info->filename; +ok( defined( $filename ) && -e $filename, + 'filename() returns valid path to module file' ); -my @packages = $pm_info->packages_inside(); -is( @packages, 2 ); -is( $packages[0], 'Simple' ); +@packages = $pm_info->packages_inside; +is( @packages, 2, 'found correct number of packages' ); +is( $packages[0], 'Simple', 'packages stored in order found' ); # we can detect presence of pod regardless of whether we are collecting it -ok( $pm_info->contains_pod() ); +ok( $pm_info->contains_pod, 'contains_pod() succeeds' ); -my @pod = $pm_info->pod_inside(); -is_deeply( \@pod, [qw(NAME AUTHOR)] ); +my @pod = $pm_info->pod_inside; +is_deeply( \@pod, [qw(NAME AUTHOR)], 'found all pod sections' ); -# no pod is collected -my $name = $pm_info->pod('NAME'); -ok( !defined( $name ) ); +is( $pm_info->pod('NONE') , undef, + 'return undef() if pod section not present' ); + +is( $pm_info->pod('NAME'), undef, + 'return undef() if pod section not collected' ); # collect_pod $pm_info = Module::Build::ModuleInfo->new_from_module( 'Simple', inc => [ $inc, @INC ], collect_pod => 1 ); -$name = $pm_info->pod('NAME'); +my $name = $pm_info->pod('NAME'); if ( $name ) { $name =~ s/^\s+//; $name =~ s/\s+$//; } -is( $name, q|Simple - It's easy.| ); - +is( $name, q|Simple - It's easy.|, 'collected pod section' ); -$dist->remove(); +$dist->remove; |
|
From: Randy W. S. <si...@us...> - 2005-04-23 12:00:22
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10931/lib/Module/Build Modified Files: ModuleInfo.pm Log Message: Correct some edge cases and update tests accordingly. Also, updated tests with descriptions. Index: ModuleInfo.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/ModuleInfo.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ModuleInfo.pm 20 Feb 2005 10:17:35 -0000 1.3 +++ ModuleInfo.pm 23 Apr 2005 12:00:14 -0000 1.4 @@ -74,7 +74,8 @@ } } - $self->{version} = $self->{versions}{$self->{module}}; + $self->{version} = $self->{versions}{$self->{module}} + if defined( $self->{module} ); return $self; } @@ -140,8 +141,8 @@ if ( $line =~ $PKG_REGEXP ) { $pkg = $1; - $vers{$pkg} = undef; - push( @pkgs, $pkg ); + push( @pkgs, $pkg ) unless grep( $pkg eq $_, @pkgs ); + $vers{$pkg} = undef unless exists( $vers{$pkg} ); # first non-comment line in undeclared package main is VERSION } elsif ( !exists($vers{main}) && $pkg eq 'main' && @@ -226,9 +227,28 @@ sub pod_inside { @{$_[0]->{pod_headings}} } sub contains_pod { $#{$_[0]->{pod_headings}} } -sub version { $_[0]->{versions}{ $_[1] || $_[0]->{module} } } +sub version { + my $self = shift; + my $mod = shift || $self->{module}; + my $vers; + if ( defined( $mod ) && length( $mod ) && + exists( $self->{versions}{$mod} ) ) { + return $self->{versions}{$mod}; + } else { + return undef; + } +} -sub pod { $_[0]->{pod}{$_[1]} } +sub pod { + my $self = shift; + my $sect = shift; + if ( defined( $sect ) && length( $sect ) && + exists( $self->{pod}{$sect} ) ) { + return $self->{pod}{$sect}; + } else { + return undef; + } +} 1; |
|
From: Ken W. <kwi...@us...> - 2005-04-21 02:00:04
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16540/lib/Module/Build Modified Files: Base.pm Log Message: Add a pure_install action Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.415 retrieving revision 1.416 diff -u -d -r1.415 -r1.416 --- Base.pm 21 Apr 2005 01:52:57 -0000 1.415 +++ Base.pm 21 Apr 2005 01:59:55 -0000 1.416 @@ -2010,6 +2010,10 @@ } } +sub ACTION_pure_install { + shift()->depends_on('install'); +} + sub ACTION_install { my ($self) = @_; require ExtUtils::Install; |
|
From: Ken W. <kwi...@us...> - 2005-04-21 02:00:03
|
Update of /cvsroot/module-build/Module-Build/lib/Module In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16540/lib/Module Modified Files: Build.pm Log Message: Add a pure_install action Index: Build.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build.pm,v retrieving revision 1.181 retrieving revision 1.182 diff -u -d -r1.181 -r1.182 --- Build.pm 16 Apr 2005 02:01:29 -0000 1.181 +++ Build.pm 21 Apr 2005 01:59:54 -0000 1.182 @@ -393,6 +393,13 @@ output, so you can supply C<tar> and/or C<gzip> parameters to affect the result. +=item pure_install + +This action is identical to the C<install> action. In the future, +though, if C<install> starts writing to the file file +F<$(INSTALLARCHLIB)/perllocal.pod>, C<pure_install> won't, and that +will be the only difference between them. + =item realclean This action is just like the C<clean> action, but also removes the |
|
From: Ken W. <kwi...@us...> - 2005-04-21 02:00:03
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16540 Modified Files: Changes Log Message: Add a pure_install action Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.340 retrieving revision 1.341 diff -u -d -r1.340 -r1.341 --- Changes 21 Apr 2005 01:52:57 -0000 1.340 +++ Changes 21 Apr 2005 01:59:54 -0000 1.341 @@ -5,6 +5,9 @@ - Fixed a bug in subclass() which prevented people from using it to subclass subclasses of Module::Build. [Chris Dolan] + - Added a 'pure_install' action, which for the time being is + identical to the 'install' action. [Jos Boumans] + 0.27_01 (Beta for 0.28) Fri Apr 15 21:12:57 CDT 2005 |
|
From: Ken W. <kwi...@us...> - 2005-04-21 01:53:06
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13003/t Modified Files: extend.t Log Message: Fix a subclass-of-subclass bug in subclass() Index: extend.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/extend.t,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- extend.t 14 Apr 2005 16:58:22 -0000 1.13 +++ extend.t 21 Apr 2005 01:52:58 -0000 1.14 @@ -7,7 +7,7 @@ require $common_pl; } -use Test::More tests => 50; +use Test::More tests => 52; use Module::Build; ok 1; @@ -29,6 +29,16 @@ $build->dispatch('realclean'); +# Make sure the subclass can be subclassed +my $build2class = ref($build)->subclass + ( + code => "sub ACTION_loop2 {}", + class => 'MBB', + ); +can_ok( $build2class, 'ACTION_loop' ); +can_ok( $build2class, 'ACTION_loop2' ); + + { # Make sure globbing works in filenames $build->test_files('*t*'); |
|
From: Ken W. <kwi...@us...> - 2005-04-21 01:53:06
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13003/lib/Module/Build Modified Files: Base.pm Log Message: Fix a subclass-of-subclass bug in subclass() Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.414 retrieving revision 1.415 diff -u -d -r1.414 -r1.415 --- Base.pm 15 Apr 2005 22:59:00 -0000 1.414 +++ Base.pm 21 Apr 2005 01:52:57 -0000 1.415 @@ -589,8 +589,8 @@ my $fh = IO::File->new("> $filename") or die "Can't create $filename: $!"; print $fh <<EOF; package $opts{class}; -use Module::Build; -\@ISA = qw(Module::Build); +use $pack; +\@ISA = qw($pack); $opts{code} 1; EOF |
|
From: Ken W. <kwi...@us...> - 2005-04-21 01:53:05
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13003 Modified Files: Changes Log Message: Fix a subclass-of-subclass bug in subclass() Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.339 retrieving revision 1.340 diff -u -d -r1.339 -r1.340 --- Changes 16 Apr 2005 02:13:28 -0000 1.339 +++ Changes 21 Apr 2005 01:52:57 -0000 1.340 @@ -1,5 +1,10 @@ Revision history for Perl extension Module::Build. +0.27_02 + + - Fixed a bug in subclass() which prevented people from using it to + subclass subclasses of Module::Build. [Chris Dolan] + 0.27_01 (Beta for 0.28) Fri Apr 15 21:12:57 CDT 2005 |
|
From: Ken W. <kwi...@us...> - 2005-04-17 03:39:11
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21298/lib/Module/Build Modified Files: Tag: release-0_26_branch PPMMaker.pm Log Message: Fix broken link Index: PPMMaker.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/PPMMaker.pm,v retrieving revision 1.8 retrieving revision 1.8.2.1 diff -u -d -r1.8 -r1.8.2.1 --- PPMMaker.pm 28 Apr 2004 19:07:59 -0000 1.8 +++ PPMMaker.pm 17 Apr 2005 03:39:03 -0000 1.8.2.1 @@ -165,7 +165,7 @@ This package contains the code that builds F<.ppd> "Perl Package Description" files, in support of ActiveState's "Perl Package Manager". Details are here: -L<"http://aspn.activestate.com/ASPN/Downloads/ActivePerl/PPM/"> +L<http://aspn.activestate.com/ASPN/Downloads/ActivePerl/PPM/> =head1 AUTHOR |
|
From: Ken W. <kwi...@us...> - 2005-04-17 03:38:38
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21182/lib/Module/Build Modified Files: PPMMaker.pm Log Message: Fix broken link Index: PPMMaker.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/PPMMaker.pm,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- PPMMaker.pm 14 Apr 2005 02:49:12 -0000 1.9 +++ PPMMaker.pm 17 Apr 2005 03:38:29 -0000 1.10 @@ -165,7 +165,7 @@ This package contains the code that builds F<.ppd> "Perl Package Description" files, in support of ActiveState's "Perl Package Manager". Details are here: -L<"http://aspn.activestate.com/ASPN/Downloads/ActivePerl/PPM/"> +L<http://aspn.activestate.com/ASPN/Downloads/ActivePerl/PPM/> =head1 AUTHOR |