T
Tim Watts
Hi,
Couldn't find this by searching... I'm a perl programmer, but trying
out Mason for the first time. Any Mason folk here?
[Posted to the Mason Users list but that looks almost dead]
I've got this in my Apache 2 config (ignore linewraps in email):
PerlAddVar MasonCompRoot
"html=>/vol/www/www.robertsbridge.org/html"
PerlAddVar MasonCompRoot
"liblocal=> /vol/www/www.robertsbridge.org/html/*/_mason"
PerlAddVar MasonCompRoot
"libglobal=>/vol/www/www.robertsbridge.org/_mason"
and it's not doing what I'd hoped...
What I want is:
--- /_test/_test.html ---
The value is: <& var.mas &>
-----
To search:
(docroot)/_test/_mason/
(docroot)/_mason/
/vol/www/www.robertsbridge.org/_mason
Look at the HTML::Mason::Resolver man page, I was under the impression
globs were allowed?
Or do I need to implement my own resolver?
On an aside, I'd like to access the resolver directly: eg, if I have a
menu.mas component that loads a menu.dat (a perl data structure), I'd
like to have it search in the current outermost component's directory
(eg the location of the .html file), then up a directory, then up until
it hits the DocumentRoot until it finds one.
Any tips on whether I can leverage Mason for this, or do I do it the
"hard" way in perl by making my own search routine?
Many thanks. So far very impressed with Mason
Cheers
Tim
Couldn't find this by searching... I'm a perl programmer, but trying
out Mason for the first time. Any Mason folk here?
[Posted to the Mason Users list but that looks almost dead]
I've got this in my Apache 2 config (ignore linewraps in email):
PerlAddVar MasonCompRoot
"html=>/vol/www/www.robertsbridge.org/html"
PerlAddVar MasonCompRoot
"liblocal=> /vol/www/www.robertsbridge.org/html/*/_mason"
PerlAddVar MasonCompRoot
"libglobal=>/vol/www/www.robertsbridge.org/_mason"
and it's not doing what I'd hoped...
What I want is:
--- /_test/_test.html ---
The value is: <& var.mas &>
-----
To search:
(docroot)/_test/_mason/
(docroot)/_mason/
/vol/www/www.robertsbridge.org/_mason
Look at the HTML::Mason::Resolver man page, I was under the impression
globs were allowed?
Or do I need to implement my own resolver?
On an aside, I'd like to access the resolver directly: eg, if I have a
menu.mas component that loads a menu.dat (a perl data structure), I'd
like to have it search in the current outermost component's directory
(eg the location of the .html file), then up a directory, then up until
it hits the DocumentRoot until it finds one.
Any tips on whether I can leverage Mason for this, or do I do it the
"hard" way in perl by making my own search routine?
Many thanks. So far very impressed with Mason
Cheers
Tim