Commit | Line | Data |
62fa8aec |
1 | package # hide from PAUSE |
2 | DBICNGTest::Schema::Result; |
3 | |
4 | use Moose; |
5 | extends 'DBIx::Class', 'Moose::Object'; |
6 | |
7 | =head1 NAME |
8 | |
9 | DBICNGTest::Schema::Result; Base Class for result and class objects |
10 | |
11 | =head1 SYNOPSIS |
12 | |
13 | package DBICNGTest::Schema::Result::Member; |
14 | |
15 | use Moose; |
16 | extends 'DBICNGTest::Schema::Result'; |
17 | |
18 | ## Rest of the class definition. |
19 | |
20 | =head1 DESCRIPTION |
21 | |
22 | Defines the base case for loading DBIC Schemas. We add in some additional |
23 | helpful functions for administering you schemas. This namespace is dedicated |
24 | to integration of Moose based development practices |
25 | |
26 | =head1 PACKAGE METHODS |
27 | |
28 | The following is a list of package methods declared with this class. |
29 | |
30 | =head2 load_components |
31 | |
32 | Components to preload. |
33 | |
34 | =cut |
35 | |
36 | __PACKAGE__->load_components(qw/ |
37 | PK::Auto |
38 | InflateColumn::DateTime |
39 | Core |
40 | /); |
41 | |
42 | |
43 | =head1 ATTRIBUTES |
44 | |
45 | This class defines the following attributes. |
46 | |
47 | =head1 METHODS |
48 | |
49 | This module declares the following methods |
50 | |
51 | =head2 new |
52 | |
53 | overload new to make sure we get a good meta object and that the attributes all |
54 | get properly setup. This is done so that our instances properly get a L<Moose> |
55 | meta class. |
56 | |
57 | =cut |
58 | |
59 | sub new |
60 | { |
61 | my $class = shift @_; |
62 | my $attrs = shift @_; |
63 | |
64 | my $obj = $class->SUPER::new($attrs); |
65 | |
66 | return $class->meta->new_object( |
67 | __INSTANCE__ => $obj, %$attrs |
68 | ); |
69 | } |
70 | |
71 | |
72 | =head1 AUTHORS |
73 | |
74 | See L<DBIx::Class> for more information regarding authors. |
75 | |
76 | =head1 LICENSE |
77 | |
78 | You may distribute this code under the same terms as Perl itself. |
79 | |
80 | =cut |
81 | |
82 | |
83 | 1; |