[Bps-public-commit] Shipwright branch, master, updated. 60acceeb1255b9208ca42163fab2305dbc3b08ce

? sunnavy sunnavy at bestpractical.com
Tue Feb 22 22:38:04 EST 2011


The branch, master has been updated
       via  60acceeb1255b9208ca42163fab2305dbc3b08ce (commit)
       via  9016925314a28863816767d7adca2b0ea6d20f7b (commit)
       via  84ff2fa32d38e787a1e5e14b28f291e85158279e (commit)
       via  60b68e6236b6a440adbd016230088eb428a1033f (commit)
       via  d63c86c6f131c83ee2a752d3a21b45f4e5138e47 (commit)
       via  6b4f67dc1e34062545d5fefdde0085c26edac4e1 (commit)
       via  27aa85cb901e240d318a1cb05952937424988d29 (commit)
       via  7be9a6a82b025543425c3e32c82908d1852f4e92 (commit)
      from  b33a4d412894b6caee3b9b1a74ba96138ad6c5ed (commit)

Summary of changes:
 Changes                                 |   18 ++++++++++++++-
 META.yml                                |    2 +-
 lib/Shipwright.pm                       |    2 +-
 lib/Shipwright/Backend/Base.pm          |   35 ++++++++++++++++--------------
 lib/Shipwright/Util/CleanINC.pm         |    4 +-
 lib/Shipwright/Util/PatchModuleBuild.pm |    4 +-
 6 files changed, 41 insertions(+), 24 deletions(-)

- Log -----------------------------------------------------------------
commit 7be9a6a82b025543425c3e32c82908d1852f4e92
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Wed Feb 23 10:21:29 2011 +0800

    in case people use old Module::Build

diff --git a/lib/Shipwright/Backend/Base.pm b/lib/Shipwright/Backend/Base.pm
index 7cd0e8e..206d6ee 100644
--- a/lib/Shipwright/Backend/Base.pm
+++ b/lib/Shipwright/Backend/Base.pm
@@ -108,34 +108,37 @@ sub _install_module_build {
       or confess_or_die "copy Module/Build failed: $!";
 
     # Module::Build needs Module::Metadata, Perl::OSType
-    make_path( catdir( $dir, 'inc', 'Module::Metadata' ) );
-    make_path( catdir( $dir, 'inc', 'Perl' ) );
-    copy(
-        Module::Info->new_from_module('Perl::OSType')->file,
-        catdir( $dir, 'inc', 'Perl' ) )
+    if ( Module::Info->new_from_module('Perl::OSType') ) {
+        make_path( catdir( $dir, 'inc', 'Perl' ) );
+        copy( Module::Info->new_from_module('Perl::OSType')->file,
+            catdir( $dir, 'inc', 'Perl' ) )
           or confess_or_die "copy Perl/OSType.pm failed: $!";
+    }
 
-    copy(
-        Module::Info->new_from_module('Module::Metadata')->file,
-        catdir( $dir, 'inc', 'Module' ) )
-          or confess_or_die "copy Module/Metadata.pm failed: $!";
 # Module::Metadata 1.02 requires version 0.87+, which isn't in perl core yet
 # we can't simply copy version.pm to inc because it's not plain perl.
 # so here we do a maybe dangerous thing, hack Module::Metadata to not require
 # version 0.87+
 # so is Module::Build
-    my @files = ( catfile( $dir, 'inc', 'Module', 'Metadata.pm' ),
-      catfile( $dir, 'inc', 'Module', 'Build', 'Version.pm' ) );
+    my @files = catfile( $dir, 'inc', 'Module', 'Build', 'Version.pm' );
+
+    if ( Module::Info->new_from_module('Module::Metadata') ) {
+        copy( Module::Info->new_from_module('Module::Metadata')->file,
+            catdir( $dir, 'inc', 'Module' ) )
+          or confess_or_die "copy Module/Metadata.pm failed: $!";
+        push @files, catfile( $dir, 'inc', 'Module', 'Metadata.pm' );
+    }
 
     for my $file ( @files ) {
         open my $fh, '<', $file or die $!;
         local $/;
         my $content = <$fh>;
-        $content =~ s!use version.*?;!use version;!;
-        chmod 0755, $file unless -w $file;
-        open $fh, '>', $file or die $!;
-        print $fh $content;
-        close $fh;
+        if ( $content =~ s!use version.+?;!use version;! ) {
+            chmod 0755, $file unless -w $file;
+            open $fh, '>', $file or die $!;
+            print $fh $content;
+            close $fh;
+        }
     }
 }
 

commit 27aa85cb901e240d318a1cb05952937424988d29
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Wed Feb 23 10:28:11 2011 +0800

    update changes

diff --git a/Changes b/Changes
index 0bdd3e0..c9e470a 100644
--- a/Changes
+++ b/Changes
@@ -1,8 +1,15 @@
 Revision history for Shipwright
 
-2.4.20
+2.4.21 Wed Feb 23 10:23:10 CST 2011
 
-2.4.19
+* fix the bug that old Module::Build(0.36-) doesn't depend on Perl::OSType 
+    and Module::Metadata
+
+2.4.20 Tue Feb 22 16:04:31 CST 2011
+
+* fix the bug that Shipwright::Base is missing
+
+2.4.19 Mon Feb 21 15:11:57 CST 2011
 
 * use Class::XSAccessor::Compat if possible
 * copy deps of Module::Build not in core into inc( except version.pm ).

commit 6b4f67dc1e34062545d5fefdde0085c26edac4e1
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Wed Feb 23 10:28:44 2011 +0800

    bump to 2.4.22

diff --git a/Changes b/Changes
index c9e470a..f8f440a 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,7 @@
 Revision history for Shipwright
 
+2.4.22
+
 2.4.21 Wed Feb 23 10:23:10 CST 2011
 
 * fix the bug that old Module::Build(0.36-) doesn't depend on Perl::OSType 
diff --git a/META.yml b/META.yml
index 3b78829..5d221a2 100644
--- a/META.yml
+++ b/META.yml
@@ -55,4 +55,4 @@ requires:
 resources:
   license: http://dev.perl.org/licenses/
   repository: git://github.com/bestpractical/shipwright.git
-version: 2.004021
+version: 2.004022
diff --git a/lib/Shipwright.pm b/lib/Shipwright.pm
index 45d2cbe..1f04f78 100644
--- a/lib/Shipwright.pm
+++ b/lib/Shipwright.pm
@@ -2,7 +2,7 @@ package Shipwright;
 
 use warnings;
 use strict;
-use version; our $VERSION = qv('2.4.21');
+use version; our $VERSION = qv('2.4.22');
 
 use base qw/Shipwright::Base/;
 

commit d63c86c6f131c83ee2a752d3a21b45f4e5138e47
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Wed Feb 23 11:09:18 2011 +0800

    use version maybe is in the eval

diff --git a/lib/Shipwright/Backend/Base.pm b/lib/Shipwright/Backend/Base.pm
index 206d6ee..9891bab 100644
--- a/lib/Shipwright/Backend/Base.pm
+++ b/lib/Shipwright/Backend/Base.pm
@@ -133,7 +133,7 @@ sub _install_module_build {
         open my $fh, '<', $file or die $!;
         local $/;
         my $content = <$fh>;
-        if ( $content =~ s!use version.+?;!use version;! ) {
+        if ( $content =~ s!use version[^'"]+?(['"]\s*;)!use version $1;! ) {
             chmod 0755, $file unless -w $file;
             open $fh, '>', $file or die $!;
             print $fh $content;

commit 60b68e6236b6a440adbd016230088eb428a1033f
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Wed Feb 23 11:30:39 2011 +0800

    ' or " should be optional

diff --git a/lib/Shipwright/Backend/Base.pm b/lib/Shipwright/Backend/Base.pm
index 9891bab..0e8dbcf 100644
--- a/lib/Shipwright/Backend/Base.pm
+++ b/lib/Shipwright/Backend/Base.pm
@@ -133,7 +133,7 @@ sub _install_module_build {
         open my $fh, '<', $file or die $!;
         local $/;
         my $content = <$fh>;
-        if ( $content =~ s!use version[^'"]+?(['"]\s*;)!use version $1;! ) {
+        if ( $content =~ s!use version[^'"]+?(['"]?\s*;)!use version $1;! ) {
             chmod 0755, $file unless -w $file;
             open $fh, '>', $file or die $!;
             print $fh $content;

commit 84ff2fa32d38e787a1e5e14b28f291e85158279e
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Wed Feb 23 11:30:50 2011 +0800

    package name fix

diff --git a/lib/Shipwright/Util/CleanINC.pm b/lib/Shipwright/Util/CleanINC.pm
index 6ff34c8..af13048 100644
--- a/lib/Shipwright/Util/CleanINC.pm
+++ b/lib/Shipwright/Util/CleanINC.pm
@@ -1,4 +1,4 @@
-package CleanINC;
+package Shipwright::Util::CleanINC;
 use strict;
 use warnings;
 use Config;
@@ -52,7 +52,7 @@ __END__
 
 =head1 NAME
 
-CleanINC - Use this to clean @INC
+Shipwright::Util::CleanINC - Use this to clean @INC
 
 =head1 DESCRIPTION
 
diff --git a/lib/Shipwright/Util/PatchModuleBuild.pm b/lib/Shipwright/Util/PatchModuleBuild.pm
index 04bd5e6..846343c 100644
--- a/lib/Shipwright/Util/PatchModuleBuild.pm
+++ b/lib/Shipwright/Util/PatchModuleBuild.pm
@@ -1,4 +1,4 @@
-package PatchModuleBuild;
+package Shipwright::Util::PatchModuleBuild;
 use strict;
 use warnings;
 
@@ -18,7 +18,7 @@ __END__
 
 =head1 NAME
 
-PatchModuleBuild - use this to ignore man pages generation
+Shipwright::Util::PatchModuleBuild - use this to ignore man pages generation
 
 =head1 DESCRIPTION
 

commit 9016925314a28863816767d7adca2b0ea6d20f7b
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Wed Feb 23 11:38:40 2011 +0800

    release 2.4.22

diff --git a/Changes b/Changes
index f8f440a..7440af9 100644
--- a/Changes
+++ b/Changes
@@ -1,6 +1,9 @@
 Revision history for Shipwright
 
-2.4.22
+2.4.22 Wed Feb 23 11:32:58 CST 2011
+
+* make shipwright happy with old Module::Build
+* package name fixes for CleanINC and PatchModuleBuild(thanks to Robin Lee)
 
 2.4.21 Wed Feb 23 10:23:10 CST 2011
 

commit 60acceeb1255b9208ca42163fab2305dbc3b08ce
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Wed Feb 23 11:39:10 2011 +0800

    bump too 2.4.23

diff --git a/Changes b/Changes
index 7440af9..4371d4b 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,7 @@
 Revision history for Shipwright
 
+2.4.23
+
 2.4.22 Wed Feb 23 11:32:58 CST 2011
 
 * make shipwright happy with old Module::Build
diff --git a/META.yml b/META.yml
index 5d221a2..c5dddcc 100644
--- a/META.yml
+++ b/META.yml
@@ -55,4 +55,4 @@ requires:
 resources:
   license: http://dev.perl.org/licenses/
   repository: git://github.com/bestpractical/shipwright.git
-version: 2.004022
+version: 2.004023
diff --git a/lib/Shipwright.pm b/lib/Shipwright.pm
index 1f04f78..4b0dacf 100644
--- a/lib/Shipwright.pm
+++ b/lib/Shipwright.pm
@@ -2,7 +2,7 @@ package Shipwright;
 
 use warnings;
 use strict;
-use version; our $VERSION = qv('2.4.22');
+use version; our $VERSION = qv('2.4.23');
 
 use base qw/Shipwright::Base/;
 

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list