From cee7d3e7a13ef25fc9da0e2dce07d95587b202da Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Tue, 14 Aug 2012 18:20:56 +0200 Subject: Domain aliases. --- lib/Fripost/Commands/add_alias.pm | 3 +-- lib/Fripost/Email.pm | 7 ++----- 2 files changed, 3 insertions(+), 7 deletions(-) (limited to 'lib/Fripost') 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}; -- cgit v1.2.3