I would like to load user-defined plugins dynamically and initialize them by
calling init-methods rather than using the PLUGINS configuration option.
That is, rather than calling Template->new() using the usual:

    PLUGINS => {
        XMB     => 'Plugin::XMB',
        Session => 'Plugin::Session',
        Config  => 'Plugin::Config'
    },

one should be able to scan a given plugin directory (./plugin) and do the
same thing. The difference though is that once I have them loaded in a hash
array I want to initialize and configure them by calling their methods.

[% USE plugins = PLUGINS %]
[% FOREACH plugin IN plugins %]
        [% plugin.init(params) %]
[% END %]

What's the best way to accomplish this?

-- 
Kiffin Rex Gish
Gouda, The Netherlands

 



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

Reply via email to