avo has asked for the wisdom of the Perl Monks concerning the following question:

Good day monks, I have a mod_perl script which is using Template Toolkit. In this script I use a module called XX.pm. The XX module contains some variables. How do I import these variables (or XX's namespace) to my templates ? In my main program I currently have a variable which is $vars which I post to TT. Is there a way to have all variables of XX in for instance: $vars->{XX}?

Replies are listed 'Best First'.
Re: TT2 module namespace
by velusamy (Monk) on Feb 05, 2009 at 11:14 UTC

    The XX.pm module variables can be accessed by through %XX:: variable. You can take the reference of that hash variable.

Re: TT2 module namespace
by Anonymous Monk on Feb 05, 2009 at 09:49 UTC