From 4224c4cea857a8ff83c22523e4adcf8e0568c042 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Mon, 7 Jul 2014 12:41:24 +0300 Subject: [PATCH] Remove some useless debug information --- lib/App/EdwardNG.pm | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) 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 -- 2.39.2