aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/Fripost/Commands/add_alias.pm3
-rwxr-xr-xlib/Fripost/Email.pm7
2 files changed, 3 insertions, 7 deletions
diff --git a/lib/Fripost/Commands/add_alias.pm b/lib/Fripost/Commands/add_alias.pm
index 60fe378..59fe0e0 100644
--- a/lib/Fripost/Commands/add_alias.pm
+++ b/lib/Fripost/Commands/add_alias.pm
@@ -15,7 +15,6 @@ use FindBin qw($Bin);
use lib "$Bin/lib";
use Email::Valid;
-use IO::Prompter;
use Fripost::Prompt;
use Fripost::Schema;
use Fripost::Email;
@@ -31,7 +30,7 @@ sub main {
prompt_if_undefined ( "Alias goto address: ", \$goto,
[ rewrite => sub { fix_username $_ }
- , 'Invalid e-mail' => sub { Email::Valid->address($_) }
+ , 'Invalid e-mail' => sub { Email::Valid->address('fake'.$_) }
]
);
diff --git a/lib/Fripost/Email.pm b/lib/Fripost/Email.pm
index 77db104..2e35070 100755
--- a/lib/Fripost/Email.pm
+++ b/lib/Fripost/Email.pm
@@ -94,11 +94,8 @@ sub new {
$ret = $gpg->mime_sign( $msg );
}
- if ($ret) {
- foreach (@{$gpg->{last_message}}) {
- warn "WARN: $_";
- }
- }
+ map { warn "WARN: $_" } @{$gpg->{last_message}}
+ if $ret;
}
&debug($msg) if $conf->{debug};