[Bast-commits] r9144 - DBIx-Class/0.08/trunk/lib/DBIx/Class
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Wed Apr 14 15:50:56 GMT 2010
Author: ribasushi
Date: 2010-04-14 16:50:56 +0100 (Wed, 14 Apr 2010)
New Revision: 9144
Modified:
DBIx-Class/0.08/trunk/lib/DBIx/Class/Row.pm
Log:
Fix exception message
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Row.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Row.pm 2010-04-14 15:04:00 UTC (rev 9143)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Row.pm 2010-04-14 15:50:56 UTC (rev 9144)
@@ -106,10 +106,10 @@
sub __new_related_find_or_new_helper {
my ($self, $relname, $data) = @_;
+ my $rsrc = $self->result_source;
+
# create a mock-object so all new/set_column component overrides will run:
- my $rel_rs = $self->result_source
- ->related_source($relname)
- ->resultset;
+ my $rel_rs = $rsrc->related_source($relname)->resultset;
my $new_rel_obj = $rel_rs->new_result($data);
my $proc_data = { $new_rel_obj->get_columns };
@@ -117,7 +117,7 @@
MULTICREATE_DEBUG and warn "MC $self constructing $relname via new_result";
return $new_rel_obj;
}
- elsif ($self->result_source->_pk_depends_on($relname, $proc_data )) {
+ elsif ($rsrc->_pk_depends_on($relname, $proc_data )) {
if (! keys %$proc_data) {
# there is nothing to search for - blind create
MULTICREATE_DEBUG and warn "MC $self constructing default-insert $relname";
@@ -132,7 +132,7 @@
return $new_rel_obj;
}
else {
- my $us = $self->source_name;
+ my $us = $rsrc->source_name;
$self->throw_exception ("'$us' neither depends nor is depended on by '$relname', something is wrong...");
}
}
More information about the Bast-commits
mailing list