X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FRelationship.pm;h=da768acf547bbe9bf972290356d5ea59ffe14515;hb=b28cc0ba2d1d443728c9cb48d97e5a2cdccf8cb4;hp=976d295da7550c87a9d145eef2558fc545c76dcd;hpb=4a07648ace2ace5b878c63aec52b7a30c1432b4d;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Relationship.pm b/lib/DBIx/Class/Relationship.pm index 976d295..da768ac 100644 --- a/lib/DBIx/Class/Relationship.pm +++ b/lib/DBIx/Class/Relationship.pm @@ -132,9 +132,9 @@ sub create_related { sub new_related { my ($self, $rel, $values, $attrs) = @_; - $self->throw( "Can't call create_related as class method" ) + $self->throw( "Can't call new_related as class method" ) unless ref $self; - $self->throw( "create_related needs a hash" ) + $self->throw( "new_related needs a hash" ) unless (ref $values eq 'HASH'); my $rel_obj = $self->_relationships->{$rel}; $self->throw( "No such relationship ${rel}" ) unless $rel_obj;