[rt-users] Site-specific customization of RT
Smylers
smylers at gbdirect.co.uk
Tue Mar 26 11:34:44 EST 2002
darren chamberlain wrote:
> I hope I can be helpful here;
Ta.
> Quoting Smylers <smylers at gbdirect.co.uk> [Mar 26, 2002 10:12]:
>
> >
> > That was my understanding of the purpose of rt/local/, but
> > appears not to be the case. It works for html/, but not lib/.
>
> That's because the local thing is for HTML::Mason's component root
> only, and has nothing to do with perl.
perldoc HTML::Mason::Interp suggests that HTML::Mason can take multiple
alternative component roots. The fact that it's called "local" is an
'RT' thing rather than being hardcoded into Mason.
> > use lib "/usr/local/rt/lib";
> > use lib "/usr/local/rt/local/lib";
> > use lib "/usr/local/rt/etc";
>
> This will work, although for completely different reasons than
> the reasons that local works for html files and Mason components.
Yeah.
> > * What should be in rt/local/ then? If rt/local/lib/ isn't the done
> > thing then the only content of that directory is rt/local/WebRT/,
> > and the only content of _that_ directory is rt/local/WebRT/html/,
> > and I don't see the point of having two extra levels of hierarchy
> > that don't contain anything.
>
> Note that the way HTML::Mason works is that components will be
> looked for in local, not HTML files called by Apache.
Yup. But since Mason doesn't do this by itself, it means somebody
specifically designed 'RT' with the rt/local/ in mind. I'm trying to
work out _what_ they had in mind.
config.pm has these two settings:
$MasonComponentRoot = "/usr/local/rt/WebRT/html";
$MasonLocalComponentRoot = "/usr/local/rt/local/WebRT/html";
Why did somebody decide to make that second one what it is, and not,
say:
$MasonLocalComponentRoot = "/usr/local/rt/local";
The logical conclusion is that there's something else which can go under
rt/local/ other than rt/local/local/WebRT/html/. That's why I then
tried putting libraries there, since it made sense.
> Here's an abbreviated look at how HTML pages are served through
> HTML::Mason: The browser requests a URI, Apache turns it into a
> path on the system, and then Apache passes control to
> HTML::Mason ... <Snip>
That's what I was assuming. Although there's something going on which
makes Mason only do this for some types of files -- do you know how to
make it try to grab images locally as well:
http://lists.fsck.com/pipermail/rt-users/2002-March/007373.html
> So why does the second "use lib" line above work? Because it's
> telling perl, not HTML::Mason, where to look for perl modules.
> If you have a Mason component that loads My::RT::Module, perl's
> lib path is searched, not Mason's component root.
I follow _why_ it works. It seemed to me to be nicely symmetrical to
make the two different paths work like that, which is how I initially
mis-interpreted 'RT' as being. When I saw that it wasn't, it was
trivial to make it so.
My mis-understanding is conceptual rather than technical -- why is
rt/local/ like it is, and how does 'RT' envisage that it should be used?
Thanks very much for your time on this.
Smylers
--
GBdirect
http://www.gbdirect.co.uk/
More information about the rt-users
mailing list