For information about current developments and future releases, see:
http://maypole.perl.org/?TheRoadmap
-2.07 Sun Jan 16 18:45:00 2005
+2.07 Mon Jan 24 20:00:00 2005
Internal changes:
- Removed Maypole::Model->description. It didn't work as expected and
clashed with 'description' columns in the database
undefined element
- Fixed overriding $r->template_args->{classmetadata} in M::V::Base
(Thanks to Dave Howorth for spotting the mistake)
+ - FETCH_CODE_ATRIBUTES in M::M::Base should return an empty list if there
+ are no attributes
+ - M::M::CDBI will warn() about Class::DBI::FromCGI errors
- #9473: Maypole::Model::CDBI->related_class (Thanks David Baird)
- #9434: M::M::CDBI->search generated "uninitialized value" warnings
sub MODIFY_CODE_ATTRIBUTES { $remember{ $_[1] } = $_[2]; () }
-sub FETCH_CODE_ATTRIBUTES { $remember{ $_[1] } }
+sub FETCH_CODE_ATTRIBUTES { $remember{ $_[1] } || () }
sub process {
my ( $class, $r ) = @_;
my ( $self, $action ) = @_;
my $cv = $self->can($action);
return 0 unless $cv;
- my $attrs = join " ", attributes::get($cv);
+ my $attrs = join " ", (attributes::get($cv) || ());
do {
warn "$action not exported" if Maypole->debug;
return 0;
{ required => $r->{config}{ $r->{table} }{required_cols} || [], }
);
};
- $fatal = $@;
+ if ($fatal = $@) {
+ warn "$fatal" if $r->debug;
+ }
$creating++;
}
if ( my %errors = $fatal ? (FATAL => $fatal) : $obj->cgi_update_errors ) {
else {
$r->{template} = "view";
}
- $r->objects( [$obj] );
+ $r->objects( $obj ? [$obj] : []);
}
sub delete : Exported {
[% PROCESS macros %]
[% INCLUDE header %]
[% INCLUDE title %]
-[% IF objects.length %]
+[% IF objects.size %]
<div id="title">Edit a [% classmetadata.moniker %]</div>
[% FOR item = objects; %]
<form action="[% base %]/[% item.table %]/do_edit/[% item.id %]" method="post">