RoutesAuthDBI/Model/Refs.pm untested

filter: Statementstmt 0.0% 0 / 10 Branchbran 0.0% 0 / 6 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 3 totaltotal 0.0% 0 / 28 CC 4 SCAR 16.9
CC
4
Cov
0%
exists
6.0
refer
6.0
del
6.0
CRAP 5.4
1 package Mojolicious::Plugin::RoutesAuthDBI::Model::Refs;
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 exists {
10 my $self = ref($_[0]) ? shift : shift->new;
11
12 $self->dbh->selectrow_array($self->sth('exists refs'), undef, (shift, shift));
13 }
14  
15 sub refer {
16 my $self = ref($_[0]) ? shift : shift->new;
17
18 $self->dbh->selectrow_hashref($self->sth('ref'), undef, (@_))
19 || $self->dbh->selectrow_hashref($self->sth('new ref'), undef, (@_));
20
21 }
22  
23 sub del {
24 my $self = ref($_[0]) ? shift : shift->new;
25
26 $self->dbh->selectrow_hashref($self->sth('del ref'), undef, (@_));
27 }
28  
29 1;
30  
31 __DATA__