Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

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

by roboticus (Chancellor)
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 scrutinizing the Monastery: (10)
As of 2016-09-29 11:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (552 votes). Check out past polls.