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

sartak at bestpractical.com sartak at bestpractical.com
Fri Jul 18 15:50:00 EDT 2008


Author: sartak
Date: Fri Jul 18 15:50:00 2008
New Revision: 14283

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

Log:
 r64591 at onn:  sartak | 2008-07-18 15:49:54 -0400
 Improve the prompt to look at the program name so that apps don't necessarily need to override this method


Modified: Prophet/trunk/lib/Prophet/CLI/Command/Shell.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/CLI/Command/Shell.pm	(original)
+++ Prophet/trunk/lib/Prophet/CLI/Command/Shell.pm	Fri Jul 18 15:50:00 2008
@@ -2,8 +2,12 @@
 package Prophet::CLI::Command::Shell;
 use Moose;
 extends 'Prophet::CLI::Command';
+use Path::Class 'file';
 
-sub prompt { "prophet> " }
+sub prompt {
+    my $binary = file($0)->basename;
+    return "$binary> ";
+}
 
 sub run {
     my $self = shift;



More information about the Bps-public-commit mailing list