[Catalyst] displaying email addresses

Marc Logghe Marc.Logghe at DEVGEN.com
Thu Jun 28 13:05:19 GMT 2007

> Do you know if there are any Catalyst plugins, or TT filters, 
> or perl modules that can find all the email addresses in a 
> text and convert them into a Javascript code that prints that 
> email address (possibly as a link)?
Don't know about plugins or something. But I guess you can easily
achieve that by filtering your body just before sending to the browser.

sub render :ActionClass('RenderView') {}
sub end :Private {
   my ( $self, $c ) = @_;

   # do something before rendering

   # do something after rendering

sub filter :Private {
  my ( $self, $c ) = @_;
  my $body = $c->response->body();
   # replace email adresses

Don't know about TT, but if you use Mason as a view you could put the
filter code in a <filter> tag in your autohandler or something:


More information about the Catalyst mailing list