[Templates] Template::Plugin::Filter

Mark Fowler Mark Fowler <mark@indicosoftware.com>
Fri, 15 Mar 2002 01:10:36 +0000 (GMT)


On Thu, 14 Mar 2002, Allen Day wrote:

> How are the filters currently exported?  As default EXPORT, or using
> %EXPORT_TAGS ?

The module is very simple.  During "new" (which will be called when you
USE the plugin from TT) the module looks for

 @FILTERS
 @FILTERS_STATIC
 @FILTERS_DYNAMIC

In the package of the current class, and if they're there does the correct
calls to context's define_filter method to add those subroutines as
filters (or subroutines that call those subroutines as filters.)

So, no there's nothing like EXPORT_OK or EXPORT_TAGS.  Everything is
always exportedI thought about it - adding control - I could
possibly do something with the arguments to the USE.  But in the end
I decided it would overcomplicate issues.  It's probably easier just to
have one or two filters that you export with each plugin.  Filters
*shouldn't* clash with normal varibles anyway (I don't think the parser
works like that).

Later.

Mark.

-- 
  Mark Fowler
  Technology Developer
  http://www.indicosoftware.com/