[Bps-public-commit] r14590 - in Prophet/trunk: .

sartak at bestpractical.com sartak at bestpractical.com
Tue Jul 29 11:14:14 EDT 2008


Author: sartak
Date: Tue Jul 29 11:13:58 2008
New Revision: 14590

Modified:
   Prophet/trunk/   (props changed)
   Prophet/trunk/lib/Prophet/CLI.pm

Log:
 r65344 at onn:  sartak | 2008-07-29 11:13:45 -0400
 Avoid undef warnings on "./prophet"


Modified: Prophet/trunk/lib/Prophet/CLI.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/CLI.pm	(original)
+++ Prophet/trunk/lib/Prophet/CLI.pm	Tue Jul 29 11:13:58 2008
@@ -110,7 +110,7 @@
 
     my $aliases  = $self->app_handle->config->aliases;
     my $tmp      = $self->primary_commands;
-    if ($aliases->{$tmp->[0]}) {
+    if (@$tmp && $aliases->{$tmp->[0]}) {
         @ARGV = split ' ', $aliases->{$tmp->[0]};
         return $self->run_one_command;
     }
@@ -196,7 +196,7 @@
 
     # "ticket show 4" should DWIM and "ticket show --id=4"
     $self->set_arg(id => pop @primary)
-        if $primary[-1] =~ /^\d+$/;
+        if @primary && $primary[-1] =~ /^\d+$/;
 
     my $sep = 0;
     my @sep_method = (



More information about the Bps-public-commit mailing list