[Bps-public-commit] r13411 - in Shipwright/trunk: lib/Shipwright/Script

sunnavy at bestpractical.com sunnavy at bestpractical.com
Wed Jun 18 18:18:54 EDT 2008


Author: sunnavy
Date: Wed Jun 18 18:18:53 2008
New Revision: 13411

Modified:
   Shipwright/trunk/   (props changed)
   Shipwright/trunk/lib/Shipwright/Script/Rename.pm

Log:
 r13573 at sunnavys-mb:  sunnavy | 2008-06-19 06:14:43 +0800
 tiny fixes


Modified: Shipwright/trunk/lib/Shipwright/Script/Rename.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Script/Rename.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Script/Rename.pm	Wed Jun 18 18:18:53 2008
@@ -26,17 +26,16 @@
 
     my ( $name, $new_name ) = ( $self->name, $self->new_name );
 
-    unless ( $name && $new_name ) {
-        ( $name, $new_name ) = @_;
-    }
+    $name = shift unless $name;
+    $new_name = shift unless $new_name;
 
     $self->name( $name );
     $self->new_name( $new_name );
 
     die 'need name arg' unless $name;
-    die 'need new name' unless $new_name;
+    die 'need new-name arg' unless $new_name;
 
-    die "invalid new name $new_name, should only contain - and alphanumeric"
+    die "invalid new-name: $new_name, should only contain - and alphanumeric"
       unless $new_name =~ /^[-\w]+$/;
 
     my $shipwright = Shipwright->new(



More information about the Bps-public-commit mailing list