projects
/
dbsrgits/DBIx-Class.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
Explicit exception clarifying that $rsrc->from() is not a setter
[dbsrgits/DBIx-Class.git]
/
lib
/
DBIx
/
Class
/
ResultSource
/
Table.pm
diff --git
a/lib/DBIx/Class/ResultSource/Table.pm
b/lib/DBIx/Class/ResultSource/Table.pm
index
b6add2a
..
f1900f9
100644
(file)
--- a/
lib/DBIx/Class/ResultSource/Table.pm
+++ b/
lib/DBIx/Class/ResultSource/Table.pm
@@
-26,7
+26,10
@@
Returns the FROM entry for the table (i.e. the table name)
=cut
-sub from { $_[0]->name }
+sub from {
+ $_[0]->throw_exception('from() is not a setter method') if @_ > 1;
+ $_[0]->name;
+}
=head1 FURTHER QUESTIONS?