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

sunnavy at bestpractical.com sunnavy at bestpractical.com
Thu Jun 26 18:22:13 EDT 2008


Author: sunnavy
Date: Thu Jun 26 18:22:12 2008
New Revision: 13625

Modified:
   Shipwright/trunk/   (props changed)
   Shipwright/trunk/lib/Shipwright/Script/Delete.pm
   Shipwright/trunk/lib/Shipwright/Script/Flags.pm
   Shipwright/trunk/lib/Shipwright/Script/Ktf.pm
   Shipwright/trunk/lib/Shipwright/Script/Relocate.pm
   Shipwright/trunk/lib/Shipwright/Script/Rename.pm
   Shipwright/trunk/lib/Shipwright/Script/Update.pm

Log:
 r13852 at sunnavys-mb:  sunnavy | 2008-06-27 06:20:10 +0800
 die with \n seems more friendly


Modified: Shipwright/trunk/lib/Shipwright/Script/Delete.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Script/Delete.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Script/Delete.pm	Thu Jun 26 18:22:12 2008
@@ -14,7 +14,7 @@
     my $self = shift;
     my $name = shift;
 
-    die "need name arg" unless $name;
+    die "need name arg\n" unless $name;
 
     my $shipwright = Shipwright->new( repository => $self->repository, );
 
@@ -28,7 +28,7 @@
 
     my $order = $shipwright->backend->order;
 
-    die "no such dist: $name" unless grep { $_ eq $name } @$order;
+    die "no such dist: $name\n" unless grep { $_ eq $name } @$order;
 
     $shipwright->backend->delete( path => "dists/$name" );
     $shipwright->backend->delete( path => "scripts/$name" );

Modified: Shipwright/trunk/lib/Shipwright/Script/Flags.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Script/Flags.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Script/Flags.pm	Thu Jun 26 18:22:12 2008
@@ -23,7 +23,7 @@
     my $self = shift;
     my $name = shift;
 
-    die "need name arg" unless $name;
+    die "need name arg\n" unless $name;
 
     if ( $name =~ /^__/ ) {
         print "$name can't start as __\n";
@@ -43,7 +43,7 @@
     }
 
     unless ( 1 == grep { defined $_ } $self->add, $self->delete, $self->set ) {
-        die 'you should specify one and only one of add, delete and set';
+        die "you should specify one and only one of add, delete and set\n";
     }
 
     my $list;

Modified: Shipwright/trunk/lib/Shipwright/Script/Ktf.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Script/Ktf.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Script/Ktf.pm	Thu Jun 26 18:22:12 2008
@@ -21,7 +21,7 @@
     my $self = shift;
     my $name = shift;
 
-    die "need name arg" unless $name;
+    die "need name arg\n" unless $name;
 
     my $shipwright = Shipwright->new( repository => $self->repository, );
 

Modified: Shipwright/trunk/lib/Shipwright/Script/Relocate.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Script/Relocate.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Script/Relocate.pm	Thu Jun 26 18:22:12 2008
@@ -12,8 +12,8 @@
     my $self = shift;
     my ( $name, $new_source ) = @_;
 
-    die 'need name arg'   unless $name;
-    die 'need source arg' unless $new_source;
+    die "need name arg\n"   unless $name;
+    die "need source arg\n" unless $new_source;
 
     my $shipwright = Shipwright->new(
         repository => $self->repository,

Modified: Shipwright/trunk/lib/Shipwright/Script/Rename.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Script/Rename.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Script/Rename.pm	Thu Jun 26 18:22:12 2008
@@ -15,10 +15,10 @@
 
     my ( $name, $new_name ) = @_;
 
-    die 'need name arg' unless $name;
-    die 'need new-name arg' unless $new_name;
+    die "need name arg\n" unless $name;
+    die "need new-name arg\n" 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\n"
       unless $new_name =~ /^[-\w]+$/;
 
     my $shipwright = Shipwright->new(
@@ -27,7 +27,7 @@
 
     my $order = $shipwright->backend->order;
 
-    die "no such dist: $name" unless grep { $_ eq $name } @$order;
+    die "no such dist: $name\n" unless grep { $_ eq $name } @$order;
 
     $shipwright->backend->move(
         path     => "dists/$name",

Modified: Shipwright/trunk/lib/Shipwright/Script/Update.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Script/Update.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Script/Update.pm	Thu Jun 26 18:22:12 2008
@@ -47,7 +47,7 @@
     }
     else {
 
-        die 'need name arg' unless $name || $self->all;
+        die "need name arg\n" unless $name || $self->all;
 
         $map    = $shipwright->backend->map    || {};
         $source = $shipwright->backend->source || {};
@@ -115,7 +115,7 @@
             $name = $map->{$name};
         }
         else {
-            die 'invalid name ' . $name;
+            die 'invalid name ' . $name . "\n";
         }
 
         $shipwright->source(



More information about the Bps-public-commit mailing list