[Bps-public-commit] Prophet branch, config-gitlike, updated. 2d306e0d96a396254a2d0c3740de76dec0d89215

spang at bestpractical.com spang at bestpractical.com
Tue Jun 23 03:24:55 EDT 2009


The branch, config-gitlike has been updated
       via  2d306e0d96a396254a2d0c3740de76dec0d89215 (commit)
       via  7c63419d11df4e39fcc278e82695e91c0893c0e7 (commit)
      from  7fde2443ca389c60ab8cb294854df61efd90e175 (commit)

Summary of changes:
 lib/Prophet/CLI/Command.pm           |    4 ++++
 lib/Prophet/CLI/TextEditorCommand.pm |    2 +-
 2 files changed, 5 insertions(+), 1 deletions(-)

- Log -----------------------------------------------------------------
commit 7c63419d11df4e39fcc278e82695e91c0893c0e7
Author: Christine Spang <spang at mit.edu>
Date:   Tue Jun 23 10:23:19 2009 +0300

    prompt_Yn should end the pager before prompting

diff --git a/lib/Prophet/CLI/Command.pm b/lib/Prophet/CLI/Command.pm
index 089f566..18b5437 100644
--- a/lib/Prophet/CLI/Command.pm
+++ b/lib/Prophet/CLI/Command.pm
@@ -1,6 +1,7 @@
 package Prophet::CLI::Command;
 use Any::Moose;
 
+use Prophet::CLI;
 use Params::Validate qw(validate);
 
 has cli => (
@@ -225,11 +226,14 @@ otherwise. Default answer is 'Yes' (returns true).
 sub prompt_Yn {
     my $self = shift;
     my $msg = shift;
+
+    Prophet::CLI->end_pager();
     print "$msg [Y/n]: ";
 
     my $a = <STDIN>;
     chomp $a;
     print "\n";
+    Prophet::CLI->start_pager();
 
     return 1 if $a =~ /^(|y|yes)$/i;
     return 0;

commit 2d306e0d96a396254a2d0c3740de76dec0d89215
Author: Christine Spang <spang at mit.edu>
Date:   Tue Jun 23 10:24:41 2009 +0300

    Fix a precedence bug resulting in an empty template

diff --git a/lib/Prophet/CLI/TextEditorCommand.pm b/lib/Prophet/CLI/TextEditorCommand.pm
index 2dd4340..3021ef7 100644
--- a/lib/Prophet/CLI/TextEditorCommand.pm
+++ b/lib/Prophet/CLI/TextEditorCommand.pm
@@ -121,7 +121,7 @@ sub handle_template_errors {
     }
 
     ${ $args{'template_ref'} }
-        = $errors_pattern ? "$errors_pattern\n\n" : ''
+        = ($errors_pattern ? "$errors_pattern\n\n" : '')
         . $args{error} . "\n\n\n"
         . $args{bad_template};
     return 0;

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list