From: Sebastian Riedel Date: Thu, 28 Oct 2004 13:33:19 +0000 (+0000) Subject: Maypole::Model::Base::process() no more steals you the first arg after X-Git-Tag: 2.10~86 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=3f7deaafa3e8e5bf08c3b2b782abc4f12edcddf0;p=maypole.git Maypole::Model::Base::process() no more steals you the first arg after fetching objects git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@278 48953598-375a-da11-a14b-00016c27c3ee --- diff --git a/Changes b/Changes index 0bc595e..2c2e663 100644 --- a/Changes +++ b/Changes @@ -4,6 +4,8 @@ Revision history for Perl extension Maypole - Fixed Apache::MVC version (Randal Schwartz) - fixed template_args (Dave Howorth) - New Maypole::Config documentation (Dave Howorth) + - Maypole::Model::Base::process() no more steals you the first + arg after fetching objects 2.03 Tue Oct 26 13:00:00 2004 - increased version number of Apache::MVC diff --git a/lib/Maypole/Model/Base.pm b/lib/Maypole/Model/Base.pm index ea1632a..0d534a5 100644 --- a/lib/Maypole/Model/Base.pm +++ b/lib/Maypole/Model/Base.pm @@ -17,10 +17,7 @@ sub process { $r->{template} = $method; $r->objects( [] ); my $obj = $class->retrieve( $r->{args}->[0] ); - if ($obj) { - $r->objects( [$obj] ); - shift @{ $r->{args} }; - } + $r->objects( [$obj] ) if $obj; $class->$method( $r, $obj, @{ $r->{args} } ); } @@ -107,7 +104,6 @@ errors. A hash of errors will be passed to the template. sub do_edit { die "This is an abstract method" } - =item list The C method should fill C<< $r-> objects >> with all of the @@ -127,7 +123,6 @@ Empty Action. =cut - sub list : Exported { die "This is an abstract method"; }