This has always been the case, but previously from('foo') would just eat the
arguments silently
mismatches between your codebase and data source
- Calling the set_* many-to-many helper with a list (instead of an
arrayref) now emits a deprecation warning
+ - Calling the getter $rsrc->from("argument") now throws an exception
+ instead of silently discarding the argument
* New Features
- When using non-scalars (e.g. arrays) as literal bind values it is no
=cut
-sub from { $_[0]->name }
+sub from {
+ $_[0]->throw_exception('from() is not a setter method') if @_ > 1;
+ $_[0]->name;
+}
=head1 FURTHER QUESTIONS?
=cut
sub from {
- my $self = shift;
- return \"(${\$self->view_definition})" if $self->is_virtual;
- return $self->name;
+ $_[0]->throw_exception('from() is not a setter method') if @_ > 1;
+ $_[0]->is_virtual
+ ? \( '(' . $_[0]->view_definition .')' )
+ : $_[0]->name
+ ;
}
=head1 OTHER METHODS