From 36a0e0b110dca01ca0117535f94f4809d19cba8f Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 14 Oct 2017 02:20:52 +1300 Subject: Use lowercase carp/croak messages consistently --- bin/runcrypt | 8 ++++---- lib/Mail/Run/Crypt.pm | 19 ++++++++++++++++--- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/bin/runcrypt b/bin/runcrypt index ce0d109..fce767b 100755 --- a/bin/runcrypt +++ b/bin/runcrypt @@ -71,14 +71,14 @@ my ( $opt, $usage ) = describe_options( # Print help if requested if ( $opt->help ) { print $usage->text - or carp 'Failed stdout write'; + or carp 'failed stdout write'; exit 0; } # Bail if run without arguments if ( !@ARGV ) { printf {*STDERR} $usage->text - or carp 'Failed stderr write'; + or carp 'failed stderr write'; exit 2; } @@ -202,11 +202,11 @@ C, which is probably good enough in most cases. =over 4 -=item Failed stdout write +=item failed stdout usage write Usage information could not be written to the standard output stream. -=item Failed stderr write +=item failed stderr usage write Usage information could not be written to the standard error stream. diff --git a/lib/Mail/Run/Crypt.pm b/lib/Mail/Run/Crypt.pm index cc24144..7105338 100644 --- a/lib/Mail/Run/Crypt.pm +++ b/lib/Mail/Run/Crypt.pm @@ -61,7 +61,7 @@ sub run { # Run the command and wait for it to finish; keep its exit value for later my ( @out, @err ); eval { run3 \@command, undef, \@out, \@err } - or carp "Command failed: $EVAL_ERROR"; + or carp "command failed: $EVAL_ERROR"; $self->{exit} = $CHILD_ERROR >> 8; # If there was output, mail it @@ -213,9 +213,22 @@ has been successfully run. =over 4 -=item %s required +=item mailto required -One of the required properties was not passed to the constructor. +The required C property was not passed in the constructor. + +=item keyid required for signing + +Signing was specified, but no C attribute was passed in the constructor. + +=item passphrase required for signing + +Signing was specified, but no C attribute was passed in the constructor. + +=item command failed: %s + +The command did not merely fail, it could not even be started, with the given +error string. This is typically due to problems finding the executable. =back -- cgit v1.2.3