Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: best way to transfor package Mail::Internet to Email::MIME and send mail

by roboticus (Canon)
on Sep 13, 2010 at 12:17 UTC ( #859979=note: print w/ replies, xml ) Need Help??


in reply to best way to transfor package Mail::Internet to Email::MIME and send mail

swilting:

Hmmm ... many of your subs look like this:

sub from { my ($self, $from) = @_; if ($from) { $self->add(From => $from); } $self->add(From => $from); }

I don't see why you're doing the last line of each of them. Are you truly intending to call the function once when there's no from address and twice when there is? Additionally, shouldn't you bless your object in your new function? How are these subroutines going to get called if you don't?

...roboticus


Comment on Re: best way to transfor package Mail::Internet to Email::MIME and send mail
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://859979]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2014-12-28 20:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (182 votes), past polls