Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • ... until it evolves to the point where it can read email.

    People moan at Perl's syntax, and then they embrace XSL. Go figure!

    --
    • Randal L. Schwartz
    • Stonehenge
    • Ha!

      package XML::LibXSLT::Sendmail
      use strict;
      use XML::LibXSLT;
      use Mail::Sendmail;

      XML::LibXSLT->register_function( "http://example.org/mail/", "sendMail", \&xsltmail );

      sub xsltmail {
        my ($to, $from, $body) = @_;
        return sendmail( To => $to, From => $from, Message => $body ); # boolean
      }

      ...then later...

      <xsl:variable name='mailOk' select='mail:sendMail( /doc/meta/author/@email, $from, ../text )'/>
      <xsl:choose>
        <xsl:when test='$mailOk'>
         

      --

      -- Robin Berjon [berjon.com]