package Apache::MVC::Model::Base;
our %remember;
sub MODIFY_CODE_ATTRIBUTES { 
    $remember{$_[1]} = $_[2]; ()
}

sub FETCH_CODE_ATTRIBUTES { $remember{$_[1]} 
} 

sub view :Exported { }
sub edit :Exported { }

sub do_edit { die "This is an abstract method" }
sub get_objects { die "This is an abstract method" }

sub list :Exported {
    my ($self, $r) = @_;
    $r->objects([ $self->retrieve_all ]);
}

sub process {
    my ($class, $r) = @_;
    $r->template( my $method = $r->action );
    $r->objects([ $class->get_objects($r) ]);
    $class->$method($r) 
}
