From: Rafael Kitover Date: Tue, 31 May 2011 16:30:27 +0000 (-0400) Subject: add a Table class X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ffae9fb567d2634da776df0bf867f3800be90c09;p=dbsrgits%2FDBIx-Class-Schema-Loader.git add a Table class --- diff --git a/lib/DBIx/Class/Schema/Loader/Table.pm b/lib/DBIx/Class/Schema/Loader/Table.pm new file mode 100644 index 0000000..6411388 --- /dev/null +++ b/lib/DBIx/Class/Schema/Loader/Table.pm @@ -0,0 +1,32 @@ +package DBIx::Class::Schema::Loader::Table; + +use strict; +use warnings; +use base 'DBIx::Class::Schema::Loader::TableLike'; + +=head1 NAME + +DBIx::Class::Schema::Loader::Table - Class for Tables in +L + +=head1 DESCRIPTION + +Inherits from L. + +=head1 SEE ALSO + +L, L, L + +=head1 AUTHOR + +See L and L. + +=head1 LICENSE + +This library is free software; you can redistribute it and/or modify it under +the same terms as Perl itself. + +=cut + +1; +# vim:et sts=4 sw=4 tw=0: diff --git a/lib/DBIx/Class/Schema/Loader/TableLike.pm b/lib/DBIx/Class/Schema/Loader/TableLike.pm new file mode 100644 index 0000000..366eb43 --- /dev/null +++ b/lib/DBIx/Class/Schema/Loader/TableLike.pm @@ -0,0 +1,48 @@ +package DBIx::Class::Schema::Loader::TableLike; + +use strict; +use warnings; +use base 'Class::Accessor::Grouped'; + +=head1 NAME + +DBIx::Class::Schema::Loader::TableLike - Base Class for Tables and Views in +L + +=head1 METHODS + +=head2 name + +Name of the object. + +=head2 schema + +The schema (or owner) of the object. + +=cut + +__PACKAGE__->mk_group_accessors(simple => qw/ + name + schema +/); + +use overload + '""' => 'name'; + +=head1 SEE ALSO + +L, L + +=head1 AUTHOR + +See L and L. + +=head1 LICENSE + +This library is free software; you can redistribute it and/or modify it under +the same terms as Perl itself. + +=cut + +1; +# vim:et sts=4 sw=4 tw=0: