Skip Menu |

This queue is for tickets about the MailTools CPAN distribution.

Report information
The Basics
Id: 23472
Status: resolved
Priority: 0/
Queue: MailTools

Owner: Nobody in particular
Requestors: rjbs [...]

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)

Subject: throw an exception on unknown ARG
Download (untitled) / with headers
text/plain 352b
If the "new" method can't identify the type of arg passed in, it ignores it and returns a blank method. This is a problem, especialy with the current filehandle detection, which can fail to properly detect IO::Handle-like objects. If an $arg is given, but its type cannot be determined, an exception should be raised. This patch does this. -- rjbs
Subject: unknown-arg.patch
Download unknown-arg.patch
text/x-diff 478b
diff -Nur MailTools-1.74/Mail/ MailTools-rjbs/Mail/ --- MailTools-1.74/Mail/ 2006-01-21 04:16:10.000000000 -0500 +++ MailTools-rjbs/Mail/ 2006-11-17 20:37:07.000000000 -0500 @@ -71,6 +71,10 @@ $me->read_header($arg) unless exists $arg{Header}; $me->read_body($arg) unless exists $arg{Body}; } + else + { + Carp::croak "couldn't understand argument to Mail::Internet constructor"; + } } return $me;
Download (untitled) / with headers
text/plain 282b
I am really hesitating to include any changes in the MailTools modules, because there is such an incredible amount of dirty legacy code using it. However, today I am in a strong mood, and will include your modifications (although in most cases slightly modified for various reasons)

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to