On May 11, 2006, at 11:35 AM, Michael Peters wrote:

> I personally don't like this approach to organizing since it means
> you have to
> list out all of the stuff that should work normally. I prefer to
> move my
> application a directory down.



You can also do something like this:


my @dirs = qw( account corp groups login logout my search
service tags users );
foreach my $dir ( @dirs ) {
$Location{"/$dir/"} = {
SetHandler => 'modperl' ,
PerlInitHandler => 'Apache2::Reload',
PerlResponseHandler => 'RoadSound' ,
PerlCleanupHandler => 'RoadSound::cleanup',
}
}


Granted, I'm using a handler and not registry like i believe you are...

But I just wanted to show that you can quickly create an array of
items for MP to source, then just loop through them in httpd.conf

I would make this suggestion to you though : placing images/docs in
cgi-bin can be messy. if i were you, i'd suggest a seperated
directory structure. perhaps something like this:

/myapp
/myapp/cgi-bin/
/myapp/static/

apache can map everything so no one sees cgi-bin , and serve static
from one section and images from another.

if you're just 1 person, its not a big deal - but if you have to
work with others, enforcing a strict seperation from code , static
and templates helps keep people from editing/changing permissions on
files they shouldn't be touching much easier

//Jonathan Vanasco


| - - - - - - - - - - - - - - - - - - - -
| RoadSound.com / Indie-Rock.net
| Collaborative Online Management And Syndication Tools
| - - - - - - - - - - - - - - - - - - - -