]> git.decadent.org.uk Git - maypole.git/blobdiff - lib/Maypole/Model/Base.pm
Maypole::Model::Base::process() no more steals you the first arg after
[maypole.git] / lib / Maypole / Model / Base.pm
index ea1632a8cce0436c7d4c669604d788cc72bbea3b..0d534a542559e0ec5448c29ffe805bb729317a05 100644 (file)
@@ -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<list> 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";
 }