Streamline ::ResultSource::* inheritance, similar to d009cb7d
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / ResultSource / Table.pm
index 95fdce0..e1dcc03 100644 (file)
@@ -3,14 +3,10 @@ package DBIx::Class::ResultSource::Table;
 use strict;
 use warnings;
 
-use DBIx::Class::ResultSet;
+use base 'DBIx::Class::ResultSource';
+use mro 'c3';
 
-use Carp qw/croak/;
-
-use base qw/DBIx::Class/;
-__PACKAGE__->load_components(qw/ResultSource/);
-
-=head1 NAME 
+=head1 NAME
 
 DBIx::Class::ResultSource::Table - Table object
 
@@ -18,7 +14,7 @@ DBIx::Class::ResultSource::Table - Table object
 
 =head1 DESCRIPTION
 
-Table object that inherits from L<DBIx::Class::ResultSource>
+Table object that inherits from L<DBIx::Class::ResultSource>.
 
 =head1 METHODS
 
@@ -28,17 +24,22 @@ Returns the FROM entry for the table (i.e. the table name)
 
 =cut
 
-sub from { shift->name; }
+sub from {
+  $_[0]->throw_exception('from() is not a setter method') if @_ > 1;
+  $_[0]->name;
+}
 
-1;
+=head1 FURTHER QUESTIONS?
 
-=head1 AUTHORS
+Check the list of L<additional DBIC resources|DBIx::Class/GETTING HELP/SUPPORT>.
 
-Matt S. Trout <mst@shadowcatsystems.co.uk>
+=head1 COPYRIGHT AND LICENSE
 
-=head1 LICENSE
-
-You may distribute this code under the same terms as Perl itself.
+This module is free software L<copyright|DBIx::Class/COPYRIGHT AND LICENSE>
+by the L<DBIx::Class (DBIC) authors|DBIx::Class/AUTHORS>. You can
+redistribute it and/or modify it under the same terms as the
+L<DBIx::Class library|DBIx::Class/COPYRIGHT AND LICENSE>.
 
 =cut
 
+1;