On Fri Dec 14 13:39:43 2007, dotcomguy@triple-d.us wrote:
Show quoted text> On Tue May 15 22:07:00 2007, AGRUNDMA wrote:
> > This bug is fixed in 1.10.
>
> There are still problems with LocationMatch in 1.10 and 1.11. It works
> fine for the <LocationMatch ^/$> however not for other uses of
> LocationMatch. Here is an example:
>
> <Location ^/(foo|bar|baz)(/|$)>
> SetHandler perl-script
> PerlHandler Layover::Catalyst
> </Location>
>
> In 1.11, this code works fine and is handled by
> Catalyst::Controller::Root as expected. However, say you have three
> other controllers:
>
> * Catalyst::Controller::Foo
> * Catalyst::Controller::Bar
> * Catalyst::Controller::Baz
>
> In 1.07 it will correctly dispatch to the correct controller, so if I
> visit
http://www.example.com/foo/test it will refer to
> Catalyst::Controller::Foo->test.
>
> However, in 1.11 when visiting example.com/foo it displays the same as
> example.com/ (Catalyst::Controller::Root) and when visiting
> example.com/foo/test it falls back to Catalyst::Controller::Root as well.
Just a few comments from me that might lead to close this bug as I also
often think about this problem.
The problem is IMHO not generally solveable. It has to do it either way.
There are always regexes in LocationMatch that cannot be mapped to a
unambiguously path. Now, since C::E::Apache 1.10 tries to cleverly map
to the longest possible pathpart of the regex you can work around that
problem by making your regex "non-trivial enough" so that the regex
cannot be mapped to a path. See section "Application base" in catalyst
calendar entry
http://catalyst.perl.org/calendar/2007/17 for deliberate
uses of that.
My proposed patch in
http://rt.cpan.org/Ticket/Display.html?id=32150
hides the resulting "uninitialized values" warnings that occur with such
"non-trivial" regexes.
I wouldn't change the current behaviour again but maybe additionally
make it possible to deactivate the attempt to map from regex to a path,
maybe with a dedicated apache directive or variable. See my symbolic
patch for clarification.
Regards,
Steffen
--
Steffen Schwigon <schwigon@webit.de>
Dresden Perl Mongers <
http://dresden-pm.org/>
Deutscher Perl-Workshop <
http://www.perl-workshop.de/>