| 1 | package OpusVL::Preferences::RolesFor::Schema; | ||
| 2 | |||
| 3 | =head1 SYNOPSIS | ||
| 4 | |||
| 5 | This allows for our preferences to be inserted into an existing schema and make use of the existing | ||
| 6 | connection details. | ||
| 7 | |||
| 8 | # in your schema class. | ||
| 9 | with 'OpusVL::Preferences::RolesFor::Schema'; | ||
| 10 | __PACKAGE__->setup_preferences_schema; | ||
| 11 | |||
| 12 | |||
| 13 | =head1 METHODS | ||
| 14 | |||
| 15 | =head2 setup_preferences_schema | ||
| 16 | |||
| 17 | |||
| 18 | =head1 LICENSE AND COPYRIGHT | ||
| 19 | |||
| 20 | Copyright 2012 OpusVL. | ||
| 21 | |||
| 22 | This software is licensed according to the "IP Assignment Schedule" provided with the development project. | ||
| 23 | |||
| 24 | =cut | ||
| 25 | |||
| 26 | 1 | ▶ | use Moose::Role; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 27 | |||
| 28 | sub setup_preferences_schema | ||
| 29 | 0 | ▶ | { |
|
Subroutine
setup_preferences_schema: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 30 | 0 | my $package = shift; | |
| 31 | 0 | $package->load_namespaces( | |
| 32 | result_namespace => '+OpusVL::Preferences::Schema::Result', | ||
| 33 | resultset_namespace => '+OpusVL::Preferences::Schema::ResultSet', | ||
| 34 | ); | ||
| 35 | } | ||
| 36 | |||
| 37 | |||
| 38 | |||
| 39 | 1 | 1; | |