[Rt-commit] r4339 - in Jifty-DBI/trunk: . lib/Jifty/DBI
alexmv at bestpractical.com
alexmv at bestpractical.com
Wed Dec 21 02:19:48 EST 2005
Author: alexmv
Date: Wed Dec 21 02:19:48 2005
New Revision: 4339
Modified:
Jifty-DBI/trunk/ (props changed)
Jifty-DBI/trunk/lib/Jifty/DBI/Collection.pm
Log:
r7926 at zoq-fot-pik: chmrr | 2005-12-21 02:19:09 -0500
* If guessing the record_class fails based on the collection's class
name, don't just return the collection as the record class --
that'll just plop you into an infinite loop. Attempt to bail.
Modified: Jifty-DBI/trunk/lib/Jifty/DBI/Collection.pm
==============================================================================
--- Jifty-DBI/trunk/lib/Jifty/DBI/Collection.pm (original)
+++ Jifty-DBI/trunk/lib/Jifty/DBI/Collection.pm Wed Dec 21 02:19:48 2005
@@ -550,7 +550,7 @@
}
elsif ( not $self->{record_class} ) {
my $class = ref($self);
- $class =~ s/Collection$//;
+ $class =~ s/Collection$// or die "Can't guess record class from $class";
$self->{record_class} = $class;
}
return $self->{record_class};
More information about the Rt-commit
mailing list