Skip Menu |

This queue is for tickets about the MailTools CPAN distribution.

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

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

Bug Information
Severity: Critical
Broken in: 2.12
Fixed in: (no value)



Subject: Unable to call open
Passing a flattened out hash gets not-a-hashref error; passing hashref gets fatal error. Tried using v5.16.2 & v5.18.0. Example from 5.18.0: lembark@bird:tmp $ perl -MMail::Mailer -d -E 0 Loading DB routines from perl5db.pl version 1.39_09 Editor support available. Enter h or 'h h' for help, or 'man perldebug' for more help. main::(-e:1): 0 DB<2> x $m = Mail::Mailer->new( 'smtp' ); 0 Mail::Mailer::smtp=GLOB(0x277b440) -> *Symbol::GEN1 DB<3> x $m->open( qw( To 3147573477@tmomail.com From lembark@wrkhors.com Subject: test of email ) ); Can't use string ("To") as a HASH ref while "strict refs" in use at /opt/perl/5.18/lib/site_perl/5.18.0/Mail/Mailer.pm line 187. DB<4> x $m->open( { qw( To 3147573477@tmomail.com From lembark@wrkhors.com Subject: test of email ) } ); Died at /opt/perl/5.18/lib/site_perl/5.18.0/Mail/Mailer.pm line 158. DB<5> x Mail::Mailer->VERSION 0 2.12
Subject: Re: [rt.cpan.org #89613] Unable to call open
Date: Fri, 18 Oct 2013 23:23:38 +0200
To: Steven Lembark via RT <bug-MailTools [...] rt.cpan.org>
From: Mark Overmeer <mark [...] overmeer.net>
* Steven Lembark via RT (bug-MailTools@rt.cpan.org) [131018 17:41]: Show quoted text
> Fri Oct 18 13:41:42 2013: Request 89613 was acted upon. > Transaction: Ticket created by LEMBARK > Queue: MailTools > Subject: Unable to call open > > Passing a flattened out hash gets not-a-hashref error;
Is is documented that you need to pass a HASH. Show quoted text
> DB<3> x $m->open( qw( To 3147573477@tmomail.com From lembark@wrkhors.com Subject: test of email ) ); > Can't use string ("To") as a HASH ref while "strict refs" in use at /opt/perl/5.18/lib/site_perl/5.18.0/Mail/Mailer.pm line 187.
The second error: Show quoted text
> DB<4> x $m->open( { qw( To 3147573477@tmomail.com From lembark@wrkhors.com Subject: test of email ) } ); > Died at /opt/perl/5.18/lib/site_perl/5.18.0/Mail/Mailer.pm line 158.
is on $self->exec($exe, $args, \@to, $sender) or die $!; which has nothing to do with the HASH, but with the exec. Apparently the $exe cannot be started. The $exe the the mail-client, usually sendmail. It is not related to the open() itself. I will extend the text of the error message. -- Success. MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
CC: lembark [...] wrkhors.com
Subject: Re: [rt.cpan.org #89613] Unable to call open
Date: Fri, 18 Oct 2013 19:22:31 -0500
To: bug-MailTools [...] rt.cpan.org
From: Steven Lembark <lembark [...] wrkhors.com>
On Fri, 18 Oct 2013 17:24:01 -0400 "Mark Overmeer via RT" <bug-MailTools@rt.cpan.org> wrote: Show quoted text
> I will extend the text of the error message.
One suggestion: add something like $mailer->working( 'smtp' ) that can return true if the $exe argument is usable. -- Steven Lembark 3646 Flora Pl Workhorse Computing St Louis, MO 63110 lembark@wrkhors.com +1 888 359 3508
Subject: Re: [rt.cpan.org #89613] Unable to call open
Date: Sat, 19 Oct 2013 02:46:45 +0200
To: "lembark [...] wrkhors.com via RT" <bug-MailTools [...] rt.cpan.org>
From: Mark Overmeer <mark [...] overmeer.net>
* lembark@wrkhors.com via RT (bug-MailTools@rt.cpan.org) [131019 00:21]: Show quoted text
> Queue: MailTools > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=89613 > > > On Fri, 18 Oct 2013 17:24:01 -0400 > "Mark Overmeer via RT" <bug-MailTools@rt.cpan.org> wrote: >
> > I will extend the text of the error message.
> > One suggestion: add something like $mailer->working( 'smtp' ) > that can return true if the $exe argument is usable.
The first 60 lines of the module already tries to come with a usable script, so I wonder why that did not work in your case. People will not use such a method. Mail::Tools is one of the oldest modules on CPAN, and not of my hand. Apparently it works for most people the way it is. -- Regards, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
suggestion not taken