Subject: | unable to set $Email::MIME::ContentType::STRICT_PARAMS effectively |
Date: | Wed, 31 Jul 2013 07:09:32 +1000 |
To: | bug-Email-MIME-ContentType [...] rt.cpan.org |
From: | matthew green <mrg [...] eterna.com.au> |
hello.
i was just writing some simple MIME software and am using Email::MIME
for the decoding part. some of my mail is not well formed, and the
content type parser in ContentType.pm carps if it finds malformed
mail. i don't want it to do that, so i tried to set $STRICT_PARAMS,
except it doesn't work.
it looks like this line is wrong:
--- ContentType.pm.orig 2013-07-30 14:06:45.000000000 -0700
+++ ContentType.pm 2013-07-30 14:06:31.000000000 -0700
@@ -53,7 +53,7 @@
# Content-Type like this: "Content-Type: text/plain;"
# RFC 1521 section 3 says a parameter must exist if there is a
# semicolon.
- carp "Illegal Content-Type parameter $_" if $STRICT_PARAMS or $_;
+ carp "Illegal Content-Type parameter $_" if $STRICT_PARAMS and $_;
return $attribs;
}
my $attribute = lc $1;
as pointed out by Ivan Kohler. this seems to make it work.
thanks!
.mrg.