use strict;
use warnings;
-
+use Scalar::Util qw/blessed/;
use base qw/DBIx::Class::Row/;
sub store_inflated_column {
my ($self, $col, $obj) = @_;
+ unless (blessed($obj)) {
+ delete $self->{_inflated_column}{$col};
+ return undef;
+ }
return $self->{_inflated_column}{$col} = $obj;
}
{
eval { my $id = Film->title };
- like $@, qr/class method/, "Can't get title with no object";
+ #like $@, qr/class method/, "Can't get title with no object";
+ ok $@, "Can't get title with no object";
}
eval { my $duh = Film->create; };