On Thu, 24 Oct 2013 06:30:58 -0700
Jim Gibson <jimsgib...@gmail.com> wrote:

> 
> On Oct 24, 2013, at 6:07 AM, Shawn H Corey wrote:
> 
> > On Thu, 24 Oct 2013 13:52:51 +0200
> > Janek Schleicher <janek_schleic...@yahoo.de> wrote:
> > 
> >> use Email::Simple;
> >> 
> >> my $email = Email::Simple->create(
> >>   header => [
> >>     From               => $sender_addr,
> >>     To                 => 'ad...@tristatelogic.com',
> >>     X-Server-Protocol  => $server_protocol,
> >>     X-Http-User-Agent  => $http_user_agent,
> >>     X-Http-Referer     => $http_referer,
> >>     X-Remote-Addr      => $remote_addr,
> >>     X-Remote-Host      => $remote_host,
> >>   ],
> >>   body => $message
> >> );
> > 
> > Why are you using an anonymous array for the header? Wouldn't an
> > anonymous hash be better? A hash would insist on an even number of
> > elements.
> 
> According to the documentation for Email::Simple, an anonymous array
> is required for the header parameter of the create method.
> 
> <http://search.cpan.org/~rjbs/Email-Simple-2.202/lib/Email/Simple.pm#create>
> 
> Suggestions for improvement should be directed to the module's author
> (but you knew that, right?).
> 
> 

Well, the only reason to do that is to preserve the order. I didn't
realize that email was that pernickety.


-- 
Don't stop where the ink does.
        Shawn

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to