* Franco Bagnoli <franco.bagnoli at unifi.it> [2004/03/18 13:51]:
> I am missing something easy: how can I USE a plugin stored somewhere? say 
> I want to use the plugin Foo which is stored in Foo.pm in the current 
> directory. Where can I set the equivalent of INC? 

You can use PLUGIN_BASE to as a namespace prefix:

  PLUGIN_BASE
    If a plugin is not defined in the PLUGINS hash then the PLUGIN_BASE
    is used to attempt to construct a correct Perl module name which can
    be successfully loaded.

    The PLUGIN_BASE can be specified as a single value or as a reference
    to an array of multiple values.  The default PLUGIN_BASE value,
    'Template::Plugin', is always added the the end of the PLUGIN_BASE
    list (a single value is first converted to a list).  Each value
    should contain a Perl package name to which the requested plugin
    name is appended.

So, to access ./Foo.pm. you could set one of the values of PLUGIN_BASE
to '', and chdir appropriately.

(darren)

-- 
If I worked as much as others I would do as little as they.

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to