From: Marius Gavrilescu Date: Mon, 7 Jul 2014 09:41:24 +0000 (+0300) Subject: Remove some useless debug information X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=4224c4cea857a8ff83c22523e4adcf8e0568c042;p=app-edwardng.git Remove some useless debug information --- diff --git a/lib/App/EdwardNG.pm b/lib/App/EdwardNG.pm index 08b50eb..2d81020 100644 --- a/lib/App/EdwardNG.pm +++ b/lib/App/EdwardNG.pm @@ -36,25 +36,17 @@ sub first_part{ } sub process_message { - my ($msg) = @_; + my ($in) = @_; + my $msg; my $parser = MIME::Parser->new; $parser->decode_bodies(0); $parser->output_to_core(1); - if (ref $msg eq 'MIME::Entity') { - debug 'Got MIME::Entity'; - } elsif (ref $msg eq 'IO') { - debug 'Parsing from filehandle'; - $msg = $parser->parse($msg) - } elsif (ref $msg eq 'SCALAR') { - debug 'Parsing from string'; - $msg = $parser->parse_data($$msg) - } elsif (!ref $msg) { - debug "Parsing from file $msg"; - $msg = $parser->parse_open($msg) - } else { - die "Don't know how to parse $msg" - } + $msg = $in if ref $in eq 'MIME::Entity'; + $msg = $parser->parse ($in) if ref $in eq 'IO'; + $msg = $parser->parse_data ($in) if ref $in eq 'SCALAR'; + $msg = $parser->parse_open ($in) unless ref $in; + die "Don't know how to parse $in" unless $msg; if ($msg->mime_type ne 'multipart/signed' && $msg->mime_type ne 'multipart/encrypted') { # PGP/Inline requires decoding