aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-10-14 02:20:52 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-10-14 02:20:52 +1300
commit36a0e0b110dca01ca0117535f94f4809d19cba8f (patch)
tree537c9c052a30468b9e9ea8166ba8de7d14522ca3
parentTest existence and definedness for hash options (diff)
downloadMail-Run-Crypt-36a0e0b110dca01ca0117535f94f4809d19cba8f.tar.gz
Mail-Run-Crypt-36a0e0b110dca01ca0117535f94f4809d19cba8f.zip
Use lowercase carp/croak messages consistently
-rwxr-xr-xbin/runcrypt8
-rw-r--r--lib/Mail/Run/Crypt.pm19
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<runcrypt>, 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<mailto> property was not passed in the constructor.
+
+=item keyid required for signing
+
+Signing was specified, but no C<keyid> attribute was passed in the constructor.
+
+=item passphrase required for signing
+
+Signing was specified, but no C<passphrase> 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