File Coverage

blib/lib/Articulate/Storage/DBIC/Simple/Schema.pm
Criterion Covered Total %
statement 13 13 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod 1 1 100.0
total 18 18 100.0


line stmt bran cond sub pod time code
1             package Articulate::Storage::DBIC::Simple::Schema;
2 2     2   2172 use strict;
  2         3  
  2         59  
3 2     2   6 use warnings;
  2         4  
  2         42  
4              
5 2     2   8 use base qw/DBIx::Class::Schema/;
  2         3  
  2         1229  
6             __PACKAGE__->load_namespaces();
7              
8             =head1 NAME
9              
10             Articulate::Storage::DBIC::Simple::Schema
11              
12             =head1 SYNOPSIS
13              
14             $schema->connect($dsn, $user, $password, $options);
15              
16             This schema class extends L; the schema has one resultset,
17             L.
18              
19             =head1 METHODS
20              
21             =head3 connect_and_deploy
22              
23             This convenience constructor performs a C (using the args provided) followed by a C (with no args). It is useful for deploying in environments where you are sure that no previous schema exists (e.g. an in-memory database).
24              
25             =head1 SEE ALSO
26              
27             =over
28              
29             =item * L
30              
31             =item * L
32              
33             =item * L
34              
35             =back
36              
37             =cut
38              
39             sub connect_and_deploy {
40 1     1 1 2 my $package = shift;
41 1         45 my $self = $package->connect(@_);
42 1         45079 $self->deploy();
43 1         283880 return $self;
44             }
45              
46             1;