return if $r->{template}; # Authentication has set this, we're done.
$r->{template} = $method;
- $r->objects( [] );
- my $obj = $class->retrieve( $r->{args}->[0] );
- if ($obj) {
- $r->objects( [$obj] );
- shift @{ $r->{args} };
- }
+ $r->objects([ $class->fetch_objects($r) ]);
$class->$method( $r, $obj, @{ $r->{args} } );
}
This maps between a table name and its associated class.
-=head2 retrieve
+=head2 fetch_objects
-This turns an ID into an object of the appropriate class.
+This method should populate $r->objects from $r->{args}.
=head2 adopt
sub class_of { die "This is an abstract method" }
sub setup_database { die "This is an abstract method" }
+sub fetch_objects { die "This is an abstract method" }
=head2 Commands
sub do_edit { die "This is an abstract method" }
-
=item list
The C<list> method should fill C<< $r-> objects >> with all of the
=cut
-
sub list : Exported {
die "This is an abstract method";
}