| 1 | package | ||
| 2 | Schema; # Hide from PAUSE. This is just an example. | ||
| 3 | |||
| 4 | our $VERSION = 0; | ||
| 5 | |||
| 6 | |||
| 7 | |||
| 8 | #CHECK LIST: | ||
| 9 | # Pay attention when column is renamed: you probably should use RENAME instead | ||
| 10 | # of DROP/ADD | ||
| 11 | |||
| 12 | use strict; | ||
| 13 | use warnings; | ||
| 14 | |||
| 15 | # based on the DBIx::Class Schema base class | ||
| 16 | use base qw/ DBIx::Class::Schema /; | ||
| 17 | |||
| 18 | |||
| 19 | |||
| 20 | # This will load any classes within | ||
| 21 | # Schema::Result and Schema::ResultSet (if any) | ||
| 22 | __PACKAGE__->load_namespaces( | ||
| 23 | default_resultset_class => 'ResultSet' | ||
| 24 | ); | ||
| 25 | |||
| 26 | |||
| 27 | |||
| 28 | 1; | ||
| 29 | |||
| 30 | =encoding utf8 | ||
| 31 | |||
| 32 | =head1 NAME | ||
| 33 | |||
| 34 | Schema - Example DBIx::Class schema used by the D distribution | ||
| 35 | |||
| 36 | =head1 SYNOPSIS | ||
| 37 | |||
| 38 | # DbAccess configuration (example) | ||
| 39 | { | ||
| 40 | DbAccess => { | ||
| 41 | schema => 'Schema', | ||
| 42 | # ... DSN/USER/PASS or DRVR/NAME/HOST/PORT ... | ||
| 43 | } | ||
| 44 | } | ||
| 45 | |||
| 46 | =head1 DESCRIPTION | ||
| 47 | |||
| 48 | This module is an example L<DBIx::Class::Schema> base class shipped with the | ||
| 49 | distribution. | ||
| 50 | |||
| 51 | It is intentionally minimal and is marked as an example (hidden from PAUSE). | ||
| 52 | Real applications are expected to provide their own schema classes. | ||
| 53 | |||
| 54 | =head1 METHODS | ||
| 55 | |||
| 56 | =head2 load_namespaces | ||
| 57 | |||
| 58 | This schema uses C<load_namespaces> and sets C<default_resultset_class> to | ||
| 59 | L<Schema::ResultSet>. | ||
| 60 | |||
| 61 | =head1 SEE ALSO | ||
| 62 | |||
| 63 | L<D>, L<DBIx::Class::Schema>, L<Schema::Result>, L<Schema::ResultSet> | ||
| 64 | |||
| 65 | =cut |