RoutesAuthDBI/Model/Roles.pm untested

filter: Statementstmt 0.0% 0 / 16 Branchbran 0.0% 0 / 12 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 7 Podpod 0.0% 0 / 6 totaltotal 0.0% 0 / 41 CC 7 SCAR 17.4
CC
7
Cov
0%
access
6.0
get_role
6.0
new_role
6.0
CRAP 5.7
1 package Mojolicious::Plugin::RoutesAuthDBI::Model::Roles;
2 #~ use Mojo::Base 'DBIx::Mojo::Model';
3 use Mojo::Base 'Mojolicious::Plugin::RoutesAuthDBI::Model::Base';
4  
5 #~ sub new {
6 #~ state $self = shift->SUPER::new(@_);
7 #~ }
8  
9 sub access {
10 my $self = ref($_[0]) ? shift : shift->new;
11 $self->dbh->selectrow_array($self->sth('access role'), undef, @_);
12 }
13  
14 sub get_role {
15 my $self = ref($_[0]) ? shift : shift->new;
16
17 $self->dbh->selectrow_hashref($self->sth('role'), undef, (@_));
18  
19 }
20  
21 sub new_role {
22 my $self = ref($_[0]) ? shift : shift->new;
23
24 $self->dbh->selectrow_hashref($self->sth('new role'), undef, (@_));
25  
26 }
27  
28 sub dsbl_enbl {
29 my $self = ref($_[0]) ? shift : shift->new;
30
31 $self->dbh->selectrow_hashref($self->sth('dsbl/enbl role'), undef, (@_));
32  
33 }
34  
35 sub profiles {# профили роли
36 my $self = ref($_[0]) ? shift : shift->new;
37 $self->dbh->selectall_arrayref($self->sth('role profiles'), { Slice => {} }, (shift));
38 }
39  
40 sub roles {
41 my $self = ref($_[0]) ? shift : shift->new;
42 $self->dbh->selectall_arrayref($self->sth('roles'), { Slice => {} },);
43 }
44  
45 1;
46  
47 __DATA__