From: david <[EMAIL PROTECTED]>
> Dan Muey wrote:
> > $sender = new Mail::Sender {smtp => "$smtp_serv", from => "$from"};
>
> the above should be:
>
> $sender = new Mail::Sender({smtp => $smtp_serv, from => $from});
>
> you are missing the ()
No. The () is not necessary there. Both mean exactly the same:
C:\>perl -MO=Deparse -e "use Mail::Sender; $s = new Mail::Sender
{smtp => 'foo'}"
use G;
use Mail::Sender;
$s = 'Mail::Sender'->new({'smtp', 'foo'});
-e syntax OK
C:\>perl -MO=Deparse -e "use Mail::Sender; $s = new Mail::Sender
({smtp => 'foo'})"
use G;
use Mail::Sender;
$s = 'Mail::Sender'->new({'smtp', 'foo'});
-e syntax OK
As you can see both are compiled exactly the same.
Jenda
===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]