Template::Plugin::Mariachi - gussy up email for the Mariachi mailing list archiver
[% USE Mariachi %] <b>From:</b> [% message.from | mariachi(uris => 0) %]<br /> <b>Subject:</b> [% message.subject | html | mariachi %]<br /> <b>Date:</b> [% date.format(message.epoch_date) %]<br /> <pre>[% message.body | html | mariachi %]</pre>
Used by the mariachi mailing list archiver to make emails more suitable for display as html by hiding email addresses and turning bare urls into links.
Theoretically this could be done with some other Template::Toolkit plugins but this is easier for us.
Template::Toolkit
Initialise the Mariahci filter in your template. Can take options like so:
[% USE Mariachi( uris => 0, email => 1) %]
which, in this case, turns off uri munging and turns on email munging.
Both options are on by default.
Filter some text. Can take options in a similar manner to initialisation.
[% FILTER mariachi(email => 0) %] [% somevar | mariachi(uris => 0) %]
Takes a reference to some text and returns it munged for quoting
Takes exactly the same options as callbacks to Email::Find. Currently turns all non period characters in the domain part of an email address and turns them into 'x's such that :
Email::Find
simon@thegestalt.org
becomes
simon@xxxxxxxxxx.xxx
Should be overridden if you want different behaviour.
Takes exactly the same options as callbacks to URI::Find although it actually uses URI::Find::Schemeless::Stricter.
URI::Find
URI::Find::Schemeless::Stricter
As such you should be wary if overriding that the uri may not have a scheme. This
$uri->scheme('http') unless defined $uri->scheme;
solves that particular problem (for various values of solve)
Currently just turns uris into simple clickable links
www.foo.com
<a href="http://www.foo.com">www.foo.com</a>
Strip html out of html mails?
Defang javascript and display html in line?
Copyright 2003, the Siesta Development Team
URI::Find::Schemeless::Stricter, Email::Find
To install Mariachi, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mariachi
CPAN shell
perl -MCPAN -e shell install Mariachi
For more information on module installation, please visit the detailed CPAN module installation guide.