File Coverage

blib/lib/Catalyst/Plugin/RapidApp/CoreSchema.pm
Criterion Covered Total %
statement 18 18 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod n/a
total 24 24 100.0


line stmt bran cond sub pod time code
1             package Catalyst::Plugin::RapidApp::CoreSchema;
2 1     1   549 use Moose::Role;
  1         3  
  1         9  
3 1     1   4531 use namespace::autoclean;
  1         2  
  1         7  
4              
5 1     1   84 use strict;
  1         2  
  1         17  
6 1     1   6 use warnings;
  1         2  
  1         42  
7              
8             with 'Catalyst::Plugin::RapidApp';
9              
10 1     1   6 use RapidApp::Util qw(:all);
  1         2  
  1         423  
11 1     1   8 use CatalystX::InjectComponent;
  1         2  
  1         70  
12              
13             # setupRapidApp is the main function which injects components
14             after 'setupRapidApp' => sub {
15             my $c = shift;
16             $c->injectUnlessExist(
17             'Catalyst::Model::RapidApp::CoreSchema',
18             'Model::RapidApp::CoreSchema'
19             );
20             };
21              
22             1;
23              
24              
25             __END__
26              
27             =head1 NAME
28              
29             Catalyst::Plugin::RapidApp::CoreSchema - Injects the CoreSchema model
30              
31             =head1 SYNOPSIS
32              
33             package MyApp;
34            
35             use Catalyst qw/ RapidApp::CoreSchema /;
36              
37             =head1 DESCRIPTION
38              
39             This is the base RapidApp/Catalyst plugin which sets up the "CoreSchema" database
40             for use as the common persistence store for multiple optional
41             "Core" plugins, such as L<AuthCore|Catalyst::Plugin::RapidApp::AuthCore> and
42             L<NavCore|Catalyst::Plugin::RapidApp::NavCore>.
43              
44             All plugins which use the CoreSchema and provide actual end-user features automatically
45             load this plugin, so it should never need to be loaded manually/directly.
46              
47             This plugin simply injects the special DBIC-based
48             L<Model::RapidApp::CoreSchema|Catalyst::Model::RapidApp::CoreSchema>
49             into the application to be available as:
50              
51             $c->model('RapidApp::CoreSchema');
52              
53             With the default configuration, the L<Model::RapidApp::CoreSchema|Catalyst::Model::RapidApp::CoreSchema>
54             automatically initializes and deploys itself to an SQLite database file in the root of
55             the application named C<rapidapp_coreschema.db>.
56              
57             =head1 SEE ALSO
58              
59             =over
60              
61             =item *
62              
63             L<RapidApp::Manual::Plugins>
64              
65             =item *
66              
67             L<Catalyst::Model::RapidApp::CoreSchema>
68              
69             =item *
70              
71             L<Catalyst::Plugin::RapidApp::CoreSchemaAdmin>
72              
73             =item *
74              
75             L<Catalyst>
76              
77             =back
78              
79             =head1 AUTHOR
80              
81             Henry Van Styn <vanstyn@cpan.org>
82              
83             =head1 COPYRIGHT AND LICENSE
84              
85             This software is copyright (c) 2013 by IntelliTree Solutions llc.
86              
87             This is free software; you can redistribute it and/or modify it under
88             the same terms as the Perl 5 programming language system itself.
89              
90             =cut