Hi all!

I've written a module using Module::Build and CGI::Application. I'm using 
several Template Toolkit templates all placed in one directory. (placed 
inside the module tree under "./templates/"). I'm setting this template 
directory to the default TT search path using "$self->tt_include_path()".

Now, I'd like to install this module in the path system eventually. The 
templates directory should be installed in someplace like 
"/usr/share/shlomif/myapp/templates", but one that can be over-rided by the 
installer, or calculated from various parameters like $DESTDIR, etc. 

I'd also like to have a generate .pm file that reads something like that:

<<<
package Shlomif::MyApp::DefaultConfig;

sub get_templates_dir
{
        return "/usr/share/shlomif/myapp/templates";
}

1;
>>>

Or a different value in case it was installed somewhere else. This is so web 
scripts that uses this CGI Application will know where to find its templates.

How can I do all that using Module::Build?

Regards,

        Shlomi Fish

---------------------------------------------------------------------
Shlomi Fish      [EMAIL PROTECTED]
Homepage:        http://www.shlomifish.org/

95% of the programmers consider 95% of the code they did not write, in the
bottom 5%.

Reply via email to