aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Fripost
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem.moulin@fripost.org>2012-08-14 18:20:56 +0200
committerGuilhem Moulin <guilhem.moulin@fripost.org>2012-08-14 18:20:56 +0200
commitcee7d3e7a13ef25fc9da0e2dce07d95587b202da (patch)
tree499b4a8c74a199423a7ec313ae72874c02e3b804 /lib/Fripost
parent76113a2549eb224ef6e7b3cf85989857cf8fdb99 (diff)
Domain aliases.
Diffstat (limited to 'lib/Fripost')
-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};