blib/lib/Ordeal/Model/Card.pm

filter: Statementstmt 91.8% 34 / 37 Branchbran 50.0% 2 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 9 / 12 Podpod 100% 2 / 2 totaltotal 85.4% 47 / 55 SCAR 13.9
CC
4
Cov
88%
data
4.2
__ANON__
2.0
__ANON__
2.0
CRAP 4.0
« blib/lib/Ordeal/Model/Backend/PlainFile.pm ↑ Summary blib/lib/Ordeal/Model/Deck.pm »
1 package Ordeal::Model::Card;
2  
3 # vim: ts=3 sts=3 sw=3 et ai :
4  
5 5 ▶use 5.020;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 5 ▶use strict; # redundant, but still useful to document
Subroutine BEGIN: called CC=1 SCAR=0.0
7 5 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 5 { our $VERSION = '0.002'; }
9 5 ▶use English qw< -no_match_vars >;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 5 ▶use Mo qw< default >;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 5 ▶use experimental qw< signatures postderef >;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 5 ▶no warnings qw< experimental::signatures experimental::postderef >;
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 use overload
16 0 ▶ ne => sub { shift->compare_ne(@_) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
17 0 ▶ bool => sub { return 1 },
Subroutine __ANON__: not called CC=1 SCAR=6.9
18 5 ▶ fallback => 0; # false but defined, disables Magic Autogeneration
Subroutine BEGIN: called CC=1 SCAR=0.0
19  
20 5 has content_type => (default => undef);
21 5 has group => (default => '');
22 5 has id => (default => undef);
23 5 has name => (default => '');
24  
25 0 ▶sub compare_ne ($self, $other, $x) { return $self->id ne $other->id }
Subroutine compare_ne: not called CC=1 SCAR=6.9
Pod documented
26  
27 1 ▶sub data ($self, $data = undef) {
Subroutine data: called CC=4 SCAR=14.5
Pod documented
28 1 ▶ $self->{data} = $data if @_ > 1;
Branch: 1 branch
BranchTrueFalseTotal
if @_ > 1 0 1 1
29 1 ▶ $self->{data} = $self->{data}->($self) if ref $self->{data};
Branch: 1 branch
BranchTrueFalseTotal
if ref $self->{"data"} 1 0 1
30 1 return $self->{data};
31 }
32  
33 5 1;
34 __END__
« blib/lib/Ordeal/Model/Backend/PlainFile.pm ↑ Summary blib/lib/Ordeal/Model/Deck.pm »