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";


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?


Shlomi Fish

Shlomi Fish shlomif@iglu.org.il
Homepage: http://www.shlomifish.org/

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

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 5 | next ›
Discussion Overview
groupmodule-authors @
postedSep 18, '05 at 1:56p
activeSep 21, '05 at 7:33p



site design / logo © 2021 Grokbase