File Coverage

blib/lib/Interchange6/Schema/Populate/Role.pm
Criterion Covered Total %
statement 9 10 90.0
branch n/a
condition n/a
subroutine 3 4 75.0
pod 1 1 100.0
total 13 15 86.6


line stmt bran cond sub pod time code
1             package Interchange6::Schema::Populate::Role;
2              
3             =head1 NAME
4              
5             Interchange6::Schema::Populate::Role
6              
7             =head1 DESCRIPTION
8              
9             This module provides population capabilities for the Role result class
10              
11             =cut
12              
13 1     1   5 use strict;
  1         2  
  1         34  
14 1     1   5 use warnings;
  1         1  
  1         35  
15              
16 1     1   6 use Moo;
  1         1  
  1         8  
17              
18             =head1 METHODS
19              
20             =head2 records
21              
22             Returns array reference containing one hash reference per role ready to use with populate schema method. Initial roles are:
23              
24             =over
25              
26             =item * admin
27              
28             =item * anonymous
29              
30             =item * authenticated
31              
32             =back
33              
34             =cut
35              
36             sub records {
37             return [
38             {
39 0     0 1   name => "admin",
40             label => "Admin",
41             description => "Shop administrator with full permissions",
42             },
43             {
44             name => "user",
45             label => "User",
46             description => "All users have this role",
47             },
48             ];
49             }
50              
51             1;