Extensions and include paths

Bradley Baetz bbaetz at acm.org
Mon Apr 14 22:06:02 UTC 2008


Extensions and include paths seem a bit confused. Firstly, theres the
template path. For a hook, the template needs to be in a file called
But any templates in an extension that want to be in the 'standard'
template include path go under
However, if its a hook thats not part of an extension, the template
needs to be a file in the directory

Plus, the extensions are added to the template include path even if
they're disabled, and they're not precompiled.


Then theres the library path. When calling a hook from an extension,
extensions/<name>/lib is temporarily added to the library path.
However, some of the hooks (eg webservices) pass back a string for a
perl module that is later dynamically required at run time, when that
directory isn't part of the libpath, so the module's name actually has
to be relative to the top level directory, ie
lib::extensions::Example::lib::Foo in those cases. And if the
extension has any supporting modules, they have to be done the same
way to be used by the webservices module. Which is a bit confusing as

(No bug for that yet)

Also, whats the reason behind the code hooks being a bunch of .pl
files rather than a standard perl module with a sub per hook?

This is all a bit confusing.... Thoughts?


More information about the developers mailing list