[Catalyst-commits] r6441 - in trunk: .
Catalyst-Controller-PathArgs/examples/MyApp/lib/MyApp/Controller
Catalyst-Controller-PathArgs/examples/MyApp/lib/MyApp/Controller/Book
jrockway at dev.catalyst.perl.org
jrockway at dev.catalyst.perl.org
Wed May 30 11:42:01 GMT 2007
Author: jrockway
Date: 2007-05-30 11:42:00 +0100 (Wed, 30 May 2007)
New Revision: 6441
Modified:
trunk/
trunk/Catalyst-Controller-PathArgs/examples/MyApp/lib/MyApp/Controller/Book.pm
trunk/Catalyst-Controller-PathArgs/examples/MyApp/lib/MyApp/Controller/Book/Edition.pm
trunk/Catalyst-Controller-PathArgs/examples/MyApp/lib/MyApp/Controller/Root.pm
Log:
Property changes on: trunk
___________________________________________________________________
Name: svk:merge
- 6d2a1d83-d666-409f-9dbf-d3bfcf4e9009:/local_branches/Catalyst-bad-mst/trunk:40156
6d2a1d83-d666-409f-9dbf-d3bfcf4e9009:/local_branches/Catalyst-broken-net/trunk:19004
6d2a1d83-d666-409f-9dbf-d3bfcf4e9009:/local_branches/Catalyst_acl_in_conf/trunk:3134
d7608cd0-831c-0410-93c0-e5b306c3c028:/local/Catalyst-trunk:26496
d7608cd0-831c-0410-93c0-e5b306c3c028:/local/Catalyst/trunk:7830
dd8ad9ea-0304-0410-a433-df5f223e7bc0:/local/Catalyst/trunk:7023
+ 6d2a1d83-d666-409f-9dbf-d3bfcf4e9009:/local_branches/Catalyst-bad-mst/trunk:40156
6d2a1d83-d666-409f-9dbf-d3bfcf4e9009:/local_branches/Catalyst-broken-net/trunk:19004
6d2a1d83-d666-409f-9dbf-d3bfcf4e9009:/local_branches/Catalyst_acl_in_conf/trunk:3134
d7608cd0-831c-0410-93c0-e5b306c3c028:/local/Catalyst-trunk:26552
d7608cd0-831c-0410-93c0-e5b306c3c028:/local/Catalyst/trunk:7830
dd8ad9ea-0304-0410-a433-df5f223e7bc0:/local/Catalyst/trunk:7023
Modified: trunk/Catalyst-Controller-PathArgs/examples/MyApp/lib/MyApp/Controller/Book/Edition.pm
===================================================================
--- trunk/Catalyst-Controller-PathArgs/examples/MyApp/lib/MyApp/Controller/Book/Edition.pm 2007-05-29 18:28:35 UTC (rev 6440)
+++ trunk/Catalyst-Controller-PathArgs/examples/MyApp/lib/MyApp/Controller/Book/Edition.pm 2007-05-30 10:42:00 UTC (rev 6441)
@@ -5,22 +5,10 @@
use warnings;
sub view : PathArgs(0) EndPoint {
- my ( $self, $c ) = @_;
- my $out = "This is the MyApp::Controller::Book::Edition controller's chained view action. ";
- $out .= "The book with id = " . $c->stash->{book}->{id} . " is on the stash. ";
- $out .= "It's edition with id = " . $c->stash->{edition}->{id} . " is on the stash. ";
- $out .= 'It\'s text is "' . $c->stash->{edition}->{text} . '" .';
- $c->response->body( $out );
+ my ( $self, $c, $id ) = @_;
+ my $text = $c->stash->{edition};
+ $c->res->body( ">$text<" );
}
-sub chained_index : PathPart('') PathArgs(0) EndPoint {
- my ( $self, $c ) = @_;
- my $out = "This is the MyApp::Controller::Book::Edition controller's chained index action. ";
- $out .= "The book with id = " . $c->stash->{book}->{id} . " is on the stash. ";
- $out .= "It's edition with id = " . $c->stash->{edition}->{id} . " is on the stash.";
- $c->response->body( $out );
-}
-
-
1;
Modified: trunk/Catalyst-Controller-PathArgs/examples/MyApp/lib/MyApp/Controller/Book.pm
===================================================================
--- trunk/Catalyst-Controller-PathArgs/examples/MyApp/lib/MyApp/Controller/Book.pm 2007-05-29 18:28:35 UTC (rev 6440)
+++ trunk/Catalyst-Controller-PathArgs/examples/MyApp/lib/MyApp/Controller/Book.pm 2007-05-30 10:42:00 UTC (rev 6441)
@@ -10,25 +10,5 @@
$c->stash->{edition} = $edition;
}
-sub edition_mascarade: PathPart('edition') PathArgs(0) EndPoint {
- my ( $self, $c ) = @_;
- my $out = "This is the MyApp::Controller::Book controller's edition_mascarade action with 0 params.";
- $out .= "The book with id = " . $c->stash->{book}->{id} . " is on stash";
- $c->response->body( $out );
-}
-
-sub index : Private {
- my ( $self, $c ) = @_;
- my $out = "This is the MyApp::Controller::Book controller's index action.";
- $c->response->body( $out );
-}
-
-sub chained_index : PathPart('') PathArgs(0) EndPoint {
- my ( $self, $c ) = @_;
- my $out = "This is the MyApp::Controller::Book controller's chained index action.";
- $out .= "The book with id = " . $c->stash->{book}->{id} . " is on stash";
- $c->response->body( $out );
-}
-
1;
Modified: trunk/Catalyst-Controller-PathArgs/examples/MyApp/lib/MyApp/Controller/Root.pm
===================================================================
--- trunk/Catalyst-Controller-PathArgs/examples/MyApp/lib/MyApp/Controller/Root.pm 2007-05-29 18:28:35 UTC (rev 6440)
+++ trunk/Catalyst-Controller-PathArgs/examples/MyApp/lib/MyApp/Controller/Root.pm 2007-05-30 10:42:00 UTC (rev 6441)
@@ -26,29 +26,28 @@
=cut
-sub index : Private {
+sub default : Private {
my ( $self, $c ) = @_;
- $c->response->body( "This is the MyApp::Controller::Root controller's index action" );
+
+ # Hello World
+ $c->response->body( $c->welcome_message );
}
our $books = {
1 => {
-id => 1,
-1 => { id => 1, text => 'Book 1 Edition 1' },
-2 => { id => 2, text => 'Book 1 Edition 2' },
-3 => { id => 3, text => 'Book 1 Edition 3' },
+1 => 'Book 1 Edition 1',
+2 => 'Book 1 Edition 2',
+3 => 'Book 1 Edition 3',
},
-2 => {
-id => 2,
-1 => { id => 1, text => 'Book 2 Edition 1' },
-2 => { id => 2, text => 'Book 2 Edition 2' },
-3 => { id => 3, text => 'Book 2 Edition 3' },
+2 => {
+1 => 'Book 2 Edition 1',
+2 => 'Book 2 Edition 2',
+3 => 'Book 2 Edition 3',
},
-3 => {
-id => 3,
-1 => { id => 1, text => 'Book 3 Edition 1' },
-2 => { id => 2, text => 'Book 3 Edition 2' },
-3 => { id => 3, text => 'Book 3 Edition 3' },
+3 => {
+1 => 'Book 3 Edition 1',
+2 => 'Book 3 Edition 2',
+3 => 'Book 3 Edition 3',
}
};
More information about the Catalyst-commits
mailing list