> sub new {
>    my $class = shift;
>    my $self = {};
>    bless $self, $class;
>    return $self;
> }

>>This is about as minimal a contructor as you'll find; there is overhead,
>>but it's pretty minimal.

>>Can you reuse the object?


I've been trying to think of a way to do just that given what I am trying to
accomplish.

Basically we have an application server of sorts and have added our own
custom tags.  I chose not to use the plugin architecture for adding new
functionality because I didn't like having to call [% use MyModule %] before
accessing functions in MyModule.  Furthermore I want to put the custom
functions in a hierarchy, such as forms.methods, payment.methods, etc..  I
know this sounds picky, but so far from user feedback people really like
just being able to call the various functions without the need for the [%
USE %] statement, or without having to say explicitly call [% myobj =
mypackage.new %], and the hierarchy makes things easier and more intuitive
for most people also.

I think that my best course is to probably just keep the number of modules
that contain custom tags to a relatively small number, which is fine.

Chris


_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to