Permalink
Browse files

actually, let's allow 0 to be this-perl

  • Loading branch information...
1 parent 7e154aa commit fb330ce95176b84b30f33986e14edb73537f8c0b @jettero committed Feb 18, 2011
Showing with 2 additions and 3 deletions.
  1. +2 −3 MrShell.pm
View
@@ -87,6 +87,8 @@ sub set_shell_command_option {
my $this = shift;
my $arg = shift;
+ $arg = [ $this->_process_space_delimited($arg||"") ] unless ref $arg;
+
if( ref($arg) eq "ARRAY" ) {
if( not $arg->[0] ) {
$this->{_shell_cmd} = sub {
@@ -107,9 +109,6 @@ sub set_shell_command_option {
} elsif( ref($arg) eq "CODE" ) {
$this->{_shell_cmd} = $arg;
-
- } else {
- $this->{_shell_cmd} = [ $this->_process_space_delimited($arg||"") ];
}
return $this;

0 comments on commit fb330ce

Please sign in to comment.