From: Christian Walde Date: Fri, 1 Mar 2013 13:50:51 +0000 (+0100) Subject: rename belongs_to to refers_to, with belongs_to remaining as alias X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3420931befe854a81e4c19a694ec491806013165;p=dbsrgits%2FDBIx-Class.git rename belongs_to to refers_to, with belongs_to remaining as alias --- diff --git a/lib/DBIx/Class/Relationship/BelongsTo.pm b/lib/DBIx/Class/Relationship/BelongsTo.pm index e55d1bd..e2adbd8 100644 --- a/lib/DBIx/Class/Relationship/BelongsTo.pm +++ b/lib/DBIx/Class/Relationship/BelongsTo.pm @@ -14,7 +14,9 @@ our %_pod_inherit_config = class_map => { 'DBIx::Class::Relationship::BelongsTo' => 'DBIx::Class::Relationship' } ); -sub belongs_to { +sub belongs_to { goto \&refers_to } + +sub refers_to { my ($class, $rel, $f_class, $cond, $attrs) = @_; # assume a foreign key contraint unless defined otherwise