Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
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?
[karlgoethebier]: http://www. uncoveror.com/ aliens.htm
[Lady_Aleena]: marioroy, I can't decide whether or not to move my RolePlaying:: Random:: modules to just Random::. I'm not as sophisticated as most here.
[marioroy]: Naming things can be difficult, sometimes more so that the actual code :)
[karlgoethebier]: Lady_Aleena: You need to jump to some conclusion
[Lady_Aleena]: And what would I rename RolePlaying/Random .pm to if I move all the RolePlaying/Random modules to just Random? Random/Util.pm Random/Base.pm, maybe lowercase the file name to indicate it is a bit different? I don't know yet.
[marioroy]: What does Random do?
[karlgoethebier]: https://www. youtube.com/watch? v=42WNHGr1jGI
[Lady_Aleena]: karlgoethebeir, I finished another project tonight, making a module which printed stop printing. It was a headache and a half.
[karlgoethebier]: Lady_Aleena: Try it!
[Lady_Aleena]: marioroy, it has 3 subroutines which can be fed data to generate random things. See here.

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (8)
As of 2017-05-29 08:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?