[Bps-public-commit] r13530 - in Shipwright/trunk: lib/Shipwright/Source

sunnavy at bestpractical.com sunnavy at bestpractical.com
Sat Jun 21 03:07:00 EDT 2008


Author: sunnavy
Date: Sat Jun 21 03:07:00 2008
New Revision: 13530

Modified:
   Shipwright/trunk/   (props changed)
   Shipwright/trunk/lib/Shipwright/Source/Base.pm
   Shipwright/trunk/lib/Shipwright/Source/SVK.pm
   Shipwright/trunk/lib/Shipwright/Source/SVN.pm

Log:
 r13616 at sunnavys-mb:  sunnavy | 2008-06-21 06:19:10 +0800
 mv is_compressed to Source/Base.pm


Modified: Shipwright/trunk/lib/Shipwright/Source/Base.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Source/Base.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Source/Base.pm	Sat Jun 21 03:07:00 2008
@@ -376,6 +376,19 @@
     return $version;
 }
 
+=head2 is_compressed
+
+return true if the source is compressed file, i.e. tar.gz(tgz) and tar.bz2
+
+=cut
+
+sub _is_compressed {
+    my $self = shift;
+    return 1 if $self->source =~ m{.*/.+\.(tar.(gz|bz2)|tgz)$};
+    return;
+}
+
+
 1;
 
 __END__

Modified: Shipwright/trunk/lib/Shipwright/Source/SVK.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Source/SVK.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Source/SVK.pm	Sat Jun 21 03:07:00 2008
@@ -30,7 +30,7 @@
     $self->log->info( "prepare to run source: " . $self->source );
     $self->_run;
     my $s;
-    if ( $self->_is_compressed ) {
+    if ( $self->is_compressed ) {
         require Shipwright::Source::Compressed;
         $s = Shipwright::Source::Compressed->new( %$self, _no_update_url => 1 );
     }
@@ -77,12 +77,6 @@
     Shipwright::Util->run($_) for @cmds;
 }
 
-sub _is_compressed {
-    my $self = shift;
-    return 1 if $self->source =~ m{.*/(.+)\.(tar.(gz|bz2)|tgz)$};
-    return;
-}
-
 1;
 
 __END__

Modified: Shipwright/trunk/lib/Shipwright/Source/SVN.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Source/SVN.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Source/SVN.pm	Sat Jun 21 03:07:00 2008
@@ -30,7 +30,7 @@
     $self->log->info( "prepare to run source: " . $self->source );
     $self->_run;
     my $s;
-    if ( $self->_is_compressed ) {
+    if ( $self->is_compressed ) {
         require Shipwright::Source::Compressed;
         $s = Shipwright::Source::Compressed->new( %$self, _no_update_url => 1 );
     }
@@ -69,12 +69,6 @@
     Shipwright::Util->run($cmd);
 }
 
-sub _is_compressed {
-    my $self = shift;
-    return 1 if $self->source =~ m{.*/(.+)\.(tar.(gz|bz2)|tgz)$};
-    return;
-}
-
 1;
 
 __END__



More information about the Bps-public-commit mailing list