[Bps-public-commit] App-CLI branch, master, updated. f669ac0f9d88e246235f0d521be90018aecc2bd6
Chia-liang Kao
clkao at bestpractical.com
Sun Oct 17 06:06:26 EDT 2010
The branch, master has been updated
via f669ac0f9d88e246235f0d521be90018aecc2bd6 (commit)
from 77e9d58491a2abd70bc36f7e2b681dd65b002015 (commit)
Summary of changes:
lib/App/CLI/Command.pm | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
- Log -----------------------------------------------------------------
commit f669ac0f9d88e246235f0d521be90018aecc2bd6
Author: c9s <cornelius.howl at gmail.com>
Date: Sun Oct 17 18:55:22 2010 +0900
Fix filename pattern.
diff --git a/lib/App/CLI/Command.pm b/lib/App/CLI/Command.pm
index ecf10e3..9b3af3f 100644
--- a/lib/App/CLI/Command.pm
+++ b/lib/App/CLI/Command.pm
@@ -106,7 +106,7 @@ section is displayed as well.
sub usage {
my ($self, $want_detail) = @_;
my $fname = $self->filename;
- my($cmd) = $fname =~ m{\W(\w+)\.pm$};
+ my ($cmd) = $fname =~ m{\W(\w+)\.pm$};
require Pod::Simple::Text;
my $parser = Pod::Simple::Text->new;
my $buf;
@@ -162,9 +162,9 @@ Return the filename for the command module.
sub filename {
my $self = shift;
my $fname = ref($self);
- $fname =~ s{::[a-z]+}{}; # subcommand
+ $fname =~ s{::[a-z]+$}{}; # subcommand
$fname =~ s{::}{/}g;
- $INC{"$fname.pm"}
+ return $INC{"$fname.pm"};
}
=head1 TODO
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list