On Tue Nov 25 17:40:37 2008, edav@acan.com.mx wrote:
Show quoted text> Hi Daniel.
Hello Erik,
Show quoted text> That is the real code, as the error obviously shows that the problem
> is in YOUR module(easy.pm), your module doesn't seem to work, at least
> in my environment,
There is no need to get upset, I'm mearly asking for clarification.
Your initial report is vague, there no information about how you got the error, the versions of
any modules involved, etc. (IE your "environment" as you put it above)
Perhaps this will help in the future:
http://www.catb.org/~esr/faqs/smart-questions.html
http://www.sindominio.net/ayuda/preguntas-inteligentes.html
Back to the problem:
The code sample you sent works perfectly fine for me on several servers (OS X , Linux,
FreeBSD, I've no windows readily available).
It times out for me with that host of course, but getting that far shows we are already inside
the "missing" easy() method.
Please know I really want to help I just need details. Here is what I am seeing in regards to
the problem you're seeing:
this script is attached (what do you get when you run it?):
multivac:~ dmuey$ perl -c rt41213.pl
rt41213.pl syntax OK
multivac:~ dmuey$ ./rt41213.pl
email() failed: Mail::Sender::Error: Connection not established at ./rt41213.pl line 8.
multivac:~ dmuey$
Show quoted text> but don't worry, I used Mail::Sender directly and
> it worked great, thanks for the help.
It should already be use()d, do you have the latest of both modules?
Show quoted text> Can't call method "easy" without a package or object reference at
> /usr/lib/perl5/site_perl/5.8.8/Mail/Sender/Easy.pm line 32.
That line is
sub email { Mail::Sender->new()->easy(shift()); }
So does 'Mail::Sender->new()' not return an object?
perl -le 'use Mail::Sender; print Mail::Sender->new();'
This is what it does for me:
multivac:~ dmuey$ perl -le 'use Mail::Sender; print Mail::Sender->new();'
Mail::Sender=HASH(0x800d80)
multivac:~ dmuey$
multivac:~ dmuey$ perl -le 'print $];';
5.008008
multivac:~ dmuey$ perl -le 'use Mail::Sender; print Mail::Sender->VERSION();'
0.8.13
multivac:~ dmuey$ perl -le 'use Mail::Sender::Easy; print Mail::Sender::Easy->VERSION();'
0.0.5
multivac:~ dmuey$