}
sub new_related {
- return shift->search_related(shift)->new_result(@_);
+ $_[0]->throw_exception("Calling new_related() as a class method is not supported")
+ unless length ref $_[0];
+
+ shift->next::method(@_);
}
=head1 FURTHER QUESTIONS?
like $@, qr/class/, "add_to_actors must be object method";
eval { my $pj = $btaste->add_to_actors(%pj_data) };
-like $@, qr/Result object instantiation requires a single hashref argument/, "add_to_actors takes hash";
+like $@, qr/Result object instantiation requires a hashref as argument/, "add_to_actors takes hash";
ok(
my $pj = $btaste->add_to_actors(