Skip Menu |

This queue is for tickets about the Catalyst-Manual CPAN distribution.

Report information
The Basics
Id: 74871
Status: resolved
Priority: 0/
Queue: Catalyst-Manual

People
Owner: Nobody in particular
Requestors: bill+bitcard [...] blunn.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Catalyst::Manual::Intro#Action-types :Global confusing example
This is a distinct issue to ticket 74869. https://metacpan.org/module/Catalyst::Manual::Intro#Action-types We have "Root-level (:Global) package MyApp::Controller::Foo; sub foo : Global { } Matches http://localhost:3000/foo ..." This is not an ideal example because the controller name tail ("Foo") and the method name ("foo") are the same apart from case. So to tell the reader that this relates to a URL tail of "foo" doesn't necessarily identify which out of the controller name or method name is used for the URL tail. It might better for it to read: "Root-level (:Global) package MyApp::Controller::Foo; sub bar : Global { } Matches http://localhost:3000/bar ..." Also see ticket 74869.
From: bill+bitcard [...] blunn.org
OK now it's weird: In http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits/Catalyst-Manual.git;a=commitdiff;h=f577e42d6082c6b034295995286d248e57e290e0 it has been changed to: Show quoted text
> sub bar : Global { > my ($self, $c) = @_; > $c->res->body( > $c->res->body('sub bar in Controller::Foo triggered on a
request for ' Show quoted text
> . $c->req->uri)); > } > > 1; > > Matches http://localhost:3000/foo - that is, the action is mapped > directly to the controller namespace, ignoring the function name.
So it looks like it's been "half" done. The sub name has been changed from "foo" to bar", but the comment below now says that this will match "http://localhost:3000/foo", but surely this is bogus because surely it will match "http://localhost:3000/bar". (See also ticket 74869 which covers the bit "- that is, the action is mapped directly to the controller namespace, ignoring the function name.")
On Sun Feb 12 05:48:39 2012, hochgurgler wrote: Show quoted text
> > sub bar : Global {
Show quoted text
> > Matches http://localhost:3000/foo - that is, the action is mapped
Buggeration. 498f110 fixes that.