File Coverage

examples/lib/My/Groups.pm
Criterion Covered Total %
statement 14 14 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod 2 2 100.0
total 22 22 100.0


line stmt bran cond sub pod time code
1             package #hide
2             My::Groups;
3 1     1   556 use strict;
  1         1  
  1         25  
4 1     1   3 use warnings;
  1         1  
  1         23  
5 1     1   3 use utf8;
  1         1  
  1         5  
6 1     1   16 use base qw (My);
  1         1  
  1         213  
7             sub TABLE {'my groups'} #problem
8             sub COLUMNS { ['id', 'group', 'is\' enabled'] } #problem
9              
10             sub ALIASES {
11 15     15 1 40 { 'is\' enabled' => 'is_enabled', }
12             }
13              
14             sub WHERE { {'is enabled' => 1} }
15              
16             sub CHECKS {
17             {
18 6     6 1 73 'is\' enabled' => {allow => qr/^[01]$/},
19             id => {allow => qr/^\d+$/x},
20             group => {required => 1, allow => qr/^\w+$/}
21             }
22             }
23             __PACKAGE__->QUOTE_IDENTIFIERS(1); #no problem now
24             __PACKAGE__->BUILD; #dbix/dbh must be connected now
25