[Bps-public-commit] r15783 - in Prophet/trunk/lib/Prophet: CLI

jesse at bestpractical.com jesse at bestpractical.com
Sun Sep 7 16:51:45 EDT 2008


Author: jesse
Date: Sun Sep  7 16:51:44 2008
New Revision: 15783

Modified:
   Prophet/trunk/lib/Prophet/App.pm
   Prophet/trunk/lib/Prophet/CLI.pm
   Prophet/trunk/lib/Prophet/CLI/Dispatcher.pm

Log:
* Better ability to handle commands which contain regex metachars


Modified: Prophet/trunk/lib/Prophet/App.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/App.pm	(original)
+++ Prophet/trunk/lib/Prophet/App.pm	Sun Sep  7 16:51:44 2008
@@ -94,7 +94,7 @@
     my $error = $@;
     if (my $message = $error) {
         $message =~ s/ at .*?\n$//;
-        if ($args{'quiet'} and $message =~ /^Can't locate $file/) {
+        if ($args{'quiet'} and $message =~ /^Can't locate \Q$file\E/) {
             return 0;
         }
         elsif ( $error !~ /^Can't locate $file/) {

Modified: Prophet/trunk/lib/Prophet/CLI.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/CLI.pm	(original)
+++ Prophet/trunk/lib/Prophet/CLI.pm	Sun Sep  7 16:51:44 2008
@@ -95,7 +95,6 @@
     );
 
     $self->dispatcher->run($command, %dispatcher_args);
-
     die "I don't know how to parse '$command'. Are you sure that's a valid command?\n" unless $class;
 
     my %constructor_args = (

Modified: Prophet/trunk/lib/Prophet/CLI/Dispatcher.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/CLI/Dispatcher.pm	(original)
+++ Prophet/trunk/lib/Prophet/CLI/Dispatcher.pm	Sun Sep  7 16:51:44 2008
@@ -17,7 +17,7 @@
 
     my @possible_classes = (
         ("Prophet::CLI::Command::" . ucfirst lc $cmd),
-        "Prophet::CLI::Command::Notound",
+        "Prophet::CLI::Command::NotFound",
     );
 
     my $cli = $args{cli};



More information about the Bps-public-commit mailing list