view release on metacpan or search on metacpan
lib/Catalyst/Manual/Tutorial/04_BasicCRUD.pod view on Meta::CPAN
| / | /index |
| /books | /books/index |
| /books/list | /books/list |
'-------------------------------------+--------------------------------------'
[debug] Loaded Chained actions:
.-------------------------------------+--------------------------------------.
| Path Spec | Private |
+-------------------------------------+--------------------------------------+
| /books/url_create/*/*/* | /books/url_create |
'-------------------------------------+--------------------------------------'
C<url_create> has disappeared from the "Loaded Path actions" section but
it now shows up under the newly created "Loaded Chained actions"
section. And the "/*/*/*" portion clearly shows our requirement for
three arguments.
As with our non-chained version of C<url_create>, use your browser to
enter the following URL:
lib/Catalyst/Manual/Tutorial/04_BasicCRUD.pod view on Meta::CPAN
C<url_create> to match the following:
sub url_create :Chained('base') :PathPart('url_create') :Args(3) {
Once you save F<lib/MyApp/Controller/Books.pm>, notice that the
development server will restart and our "Loaded Chained actions" section
will changed slightly:
[debug] Loaded Chained actions:
.-------------------------------------+--------------------------------------.
| Path Spec | Private |
+-------------------------------------+--------------------------------------+
| /books/url_create/*/*/* | /books/base (0) |
| | => /books/url_create |
lib/Catalyst/Manual/Tutorial/04_BasicCRUD.pod view on Meta::CPAN
=head2 Test Out The Form
Notice that the server startup log reflects the two new chained methods
that we added:
[debug] Loaded Chained actions:
.-------------------------------------+--------------------------------------.
| Path Spec | Private |
+-------------------------------------+--------------------------------------+
| /books/form_create | /books/base (0) |
| | => /books/form_create |
lib/Catalyst/Manual/Tutorial/04_BasicCRUD.pod view on Meta::CPAN
Once you save the Books controller, the server should automatically
restart. The C<delete> method should now appear in the "Loaded Chained
actions" section of the startup debug output:
[debug] Loaded Chained actions:
.-------------------------------------+--------------------------------------.
| Path Spec | Private |
+-------------------------------------+--------------------------------------+
| /books/id/*/delete | /books/base (0) |
| | -> /books/object (1) |
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catalyst/DispatchType/Chained.pm view on Meta::CPAN
my @display_parts = map { $_ =~s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg; decode_utf8 $_ } @parts;
$rows[0][0] = join('/', '', @display_parts) || '/';
$paths->row(@$_) for @rows;
}
$c->log->debug( "Loaded Chained actions:\n" . $paths->draw . "\n" );
$c->log->debug( "Unattached Chained actions:\n", $unattached_actions->draw . "\n" )
if $has_unattached_actions;
}
sub _list_extra_http_methods {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CatalystX/Controller/ExtJS/REST.pm view on Meta::CPAN
- type: Required
name: password
Now you can fire up your Catalyst app and you should see two new chained actions:
Loaded Chained actions:
...
| /users/... | /user/list
| /user/... | /user/object
=head2 Accessing objects
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CatalystX/SimpleLogin/Manual.pod view on Meta::CPAN
},
);
Execute C< script/myapp_server.pl > and, as part of the debug output, you should see:
[debug] Loaded Chained actions:
.-------------------------------------+--------------------------------------.
| Path Spec | Private |
+-------------------------------------+--------------------------------------+
| /login | /login/login |
| /logout | /login/logout |
view all matches for this distribution