On Thu, 01 Mar 2001, Ray Zimmerman wrote:
> AddType text/html .md
> <FilesMatch ".*\.md$">
>       SetHandler perl-script
>       PerlHandler HTML::Mason
>       Options Indexes FollowSymLinks ExecCGI
> </FilesMatch>
> <FilesMatch ".*\.mc$">
>      Order allow,deny
>      Deny from all
> </FilesMatch>

I do something similar. I have several 'global' components that I call from
many pages, and in the interest of simplification for non technical people
who might be creating pages (The same reason my mason documents end in
.html, although some more tech savvy have asked exactly how the heck I'm
doing form submission to .html files :) I created /_c/ as my component
repository, and components have no extension.

In any given page I just call something like <& /_c/loggedinas &>.

Then in httpd.conf...

<Location /_c >
order deny,allow
deny from all
</Location.

Another advantage of having all components centrally located is that there
is a patch floating around out there I need to track down that changes the
behavior of multiple comp_roots.

Right now Mason allows multiple comp_roots and will check them in order. But
the odd bit that isnt entirely clear is this...

If you use two comp_roots (call them A and B) and you serve a page to a
browser which mason finds in A, any components called from that page must
also be in A, as Mason assumes all sub requests for components are in the
comp_root. What I had originally tried was two comp_roots, one for pages,
one for called components. It doesnt work that way. If it did, all I'd have
to do is drop all my components in the second comp_root and call

<& loggedinas &> instead of <& /_c/loggedinas &>

Someone posted a patch to the Mason mailing list a while back about this, I
just havent had time to dig it up.

________________________________________________________________________
| Chris Thompson                                      [EMAIL PROTECTED] | 
+----------------------------------------------------------------------+

Reply via email to