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

sartak at bestpractical.com sartak at bestpractical.com
Wed Aug 20 05:33:40 EDT 2008


Author: sartak
Date: Wed Aug 20 05:33:39 2008
New Revision: 15279

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

Log:
 r69848 at onn:  sartak | 2008-08-20 05:33:27 -0400
 Make the "no config files" error overridable


Modified: Prophet/trunk/lib/Prophet/CLI/Command/Config.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/CLI/Command/Config.pm	(original)
+++ Prophet/trunk/lib/Prophet/CLI/Command/Config.pm	Wed Aug 20 05:33:39 2008
@@ -3,21 +3,19 @@
 extends 'Prophet::CLI::Command';
 
 sub run {
-
     my $self = shift;
 
     my $config = $self->config;
-   
+
     print "Configuration:\n\n";
     my @files =@{$config->config_files};
     if (!scalar @files) {
-        print "No configuration files found. ".
-            " Either create a file called 'prophetrc' inside of ". $self->handle->fs_root ." or set the PROPHET_APP_CONFIG environement variable.\n\n";
+        print $self->no_config_files;
         return;
     }
     for my $file (@files) {
         print "Config files:\n\n";
-            print "$file\n";    
+            print "$file\n";
     }
     print "\nYour configuration:\n\n";
     for my $item ($config->list) {
@@ -26,6 +24,13 @@
 
 }
 
+sub no_config_files {
+    return "No configuration files found. "
+         . " Either create a file called 'prophetrc' inside of "
+         . $self->handle->fs_root
+         . " or set the PROPHET_APP_CONFIG environment variable.\n\n";
+}
+
 __PACKAGE__->meta->make_immutable;
 no Moose;
 



More information about the Bps-public-commit mailing list