Skip Menu |
 

This queue is for tickets about the MailTools CPAN distribution.

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

People
Owner: Nobody in particular
Requestors: rjbs [...] cpan.org
Cc:
AdminCc:

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



Subject: throw an exception on unknown ARG
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
X-RT-Original-Encoding: utf-8
Content-Type: multipart/mixed; boundary="----------=_1163815252-23161-15"
Content-Length: 0
Content-Type: text/plain; charset="utf8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
Content-Length: 352
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
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----------=_1163815252-23161-14"
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Length: 0
Content-Type: text/plain; charset="utf8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 0
Content-Type: application/octet-stream; name="unknown-arg.patch"
Content-Disposition: inline; filename="unknown-arg.patch"
Content-Transfer-Encoding: base64
Content-Length: 478
Download unknown-arg.patch
text/x-diff 478b
diff -Nur MailTools-1.74/Mail/Internet.pm MailTools-rjbs/Mail/Internet.pm --- MailTools-1.74/Mail/Internet.pm 2006-01-21 04:16:10.000000000 -0500 +++ MailTools-rjbs/Mail/Internet.pm 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;
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Message-Id: <rt-3.6.HEAD-16899-1170679337-463.23472-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 282
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 Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.