[Bps-public-commit] Prophet branch, master, updated. 41b8b6a98eafa2b3347d9ed33bec341d6124c749
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Tue Aug 11 03:43:25 EDT 2009
The branch, master has been updated
via 41b8b6a98eafa2b3347d9ed33bec341d6124c749 (commit)
from 1035b7098f7758691e95b6c726f0b4a2e0ccc90e (commit)
Summary of changes:
lib/Prophet/CLI/Command.pm | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
- Log -----------------------------------------------------------------
commit 41b8b6a98eafa2b3347d9ed33bec341d6124c749
Author: sunnavy <sunnavy at bestpractical.com>
Date: Tue Aug 11 15:43:16 2009 +0800
make get_cmd_name happy on windows
diff --git a/lib/Prophet/CLI/Command.pm b/lib/Prophet/CLI/Command.pm
index 90c306c..22274e2 100644
--- a/lib/Prophet/CLI/Command.pm
+++ b/lib/Prophet/CLI/Command.pm
@@ -317,9 +317,9 @@ a shell or the command line.
sub get_cmd_name {
my $self = shift;
return '' if $self->cli->interactive_shell;
- my ${cmd}= $0;
- ${cmd}=~ s{^(.*)/}{}g;
- return $cmd.' ';
+ require File::Spec;
+ my ($cmd) = ( File::Spec->splitpath($0) )[2];
+ return $cmd . ' ';
}
=head2 get_cmd_and_subcmd_names [no_type => 1]
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list