[Catalyst-commits] r8261 -
CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/lib/CatalystX/CRUD/Model
karpet at dev.catalyst.perl.org
karpet at dev.catalyst.perl.org
Fri Aug 22 22:18:30 BST 2008
Author: karpet
Date: 2008-08-22 22:18:29 +0100 (Fri, 22 Aug 2008)
New Revision: 8261
Modified:
CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/lib/CatalystX/CRUD/Model/RDBO.pm
Log:
clarify variable name
Modified: CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/lib/CatalystX/CRUD/Model/RDBO.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/lib/CatalystX/CRUD/Model/RDBO.pm 2008-08-22 19:39:54 UTC (rev 8260)
+++ CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/lib/CatalystX/CRUD/Model/RDBO.pm 2008-08-22 21:18:29 UTC (rev 8261)
@@ -348,8 +348,9 @@
sub add_related {
my ( $self, $obj, $rel_name, $fk_val ) = @_;
my $addmethod = 'add_' . $rel_name;
- my $meta = $self->_get_rel_meta( $obj, $rel_name );
- $obj->$addmethod( { $meta->{map_to}->[1] => $fk_val } );
+ my $meta = $self->_get_rel_meta( $obj, $rel_name );
+ my $fpk = $meta->{map_to}->[1];
+ $obj->$addmethod( { $fpk => $fk_val } );
$obj->save;
}
More information about the Catalyst-commits
mailing list