File Coverage

blib/lib/Interchange6/Schema/Populate.pm
Criterion Covered Total %
statement 9 9 100.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod 1 1 100.0
total 12 12 100.0


line stmt bran cond sub pod time code
1             package Interchange6::Schema::Populate;
2              
3             =head1 NAME
4              
5             Interchange6::Schema::Populate - populates a website with various fixtures
6              
7             =cut
8              
9 4     4   638 use Moo;
  4         7023  
  4         28  
10             with 'Interchange6::Schema::Populate::CountryLocale',
11             'Interchange6::Schema::Populate::MessageType',
12             'Interchange6::Schema::Populate::Role',
13             'Interchange6::Schema::Populate::StateLocale',
14             'Interchange6::Schema::Populate::Zone';
15             # 'Interchange6::Schema::Populate::Currency',
16              
17             =head1 ATTRIBUTES
18              
19             =head2 schema
20              
21             A connected schema. Required.
22              
23             =cut
24              
25             has schema => (
26             is => 'ro',
27             required => 1,
28             );
29              
30             =head1 METHODS
31              
32             =head2 populate
33              
34             The following classes are populated:
35              
36             =over
37              
38             =item * L<Interchange6::Schema::Result::Country>
39              
40             See: L<Interchange6::Schema::Populate::CountryLocale>
41              
42             #=item * L<Interchange6::Schema::Result::Currency>
43             #
44             #See: L<Interchange6::Schema::Populate::Currency>
45              
46             =item * L<Interchange6::Schema::Result::MessageType>
47              
48             See: L<Interchange6::Schema::Populate::MessageType>
49              
50             =item * L<Interchange6::Schema::Result::Role>
51              
52             See: L<Interchange6::Schema::Populate::Role>
53              
54             =item * L<Interchange6::Schema::Result::State>
55              
56             See: L<Interchange6::Schema::Populate::StateLocale>
57              
58             =item * L<Interchange6::Schema::Result::Zone>
59              
60             See: L<Interchange6::Schema::Populate::Zone>
61              
62             =back
63              
64             =cut
65              
66             sub populate {
67 1     1 1 1588 my $self = shift;
68 1         10 $self->populate_countries;
69             # $self->populate_currencies;
70 1         1966 $self->populate_message_types;
71 1         1819 $self->populate_roles;
72 1         2144 $self->populate_states;
73 1         4390 $self->populate_zones;
74             };
75              
76             1;