Commit | Line | Data |
ffae9fb5 |
1 | package DBIx::Class::Schema::Loader::TableLike; |
2 | |
3 | use strict; |
4 | use warnings; |
5 | use base 'Class::Accessor::Grouped'; |
6 | |
7 | =head1 NAME |
8 | |
9 | DBIx::Class::Schema::Loader::TableLike - Base Class for Tables and Views in |
10 | L<DBIx::Class::Schema::Loader> |
11 | |
12 | =head1 METHODS |
13 | |
14 | =head2 name |
15 | |
16 | Name of the object. |
17 | |
18 | =head2 schema |
19 | |
20 | The schema (or owner) of the object. |
21 | |
22 | =cut |
23 | |
24 | __PACKAGE__->mk_group_accessors(simple => qw/ |
25 | name |
26 | schema |
27 | /); |
28 | |
29 | use overload |
e4be49c9 |
30 | '""' => sub { $_[0]->name }; |
31 | |
32 | sub new { |
33 | my $class = shift; |
34 | |
35 | return bless { @_ }, $class; |
36 | } |
ffae9fb5 |
37 | |
38 | =head1 SEE ALSO |
39 | |
40 | L<DBIx::Class::Schema::Loader>, L<DBIx::Class::Schema::Loader::Base> |
41 | |
42 | =head1 AUTHOR |
43 | |
44 | See L<DBIx::Class::Schema::Loader/AUTHOR> and L<DBIx::Class::Schema::Loader/CONTRIBUTORS>. |
45 | |
46 | =head1 LICENSE |
47 | |
48 | This library is free software; you can redistribute it and/or modify it under |
49 | the same terms as Perl itself. |
50 | |
51 | =cut |
52 | |
53 | 1; |
54 | # vim:et sts=4 sw=4 tw=0: |