SpellCheck/Plugin/PrimaryDictionary.pm

filter: Statementstmt 100% 22 / 22 Branchbran 100% 8 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod 50.0% 1 / 2 totaltotal 97.4% 38 / 39 CC 5 SCAR 10.4
CC
5
Cov
100%
new
5.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.8
« SpellCheck/Plugin/StopWords.pm ↑ Summary SpellCheck/Plugin/Perl.pm »
1 package Test::SpellCheck::Plugin::PrimaryDictionary;
2  
3 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 3 ▶use 5.026;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 3 ▶use experimental qw( signatures );
Subroutine BEGIN: called CC=1 SCAR=0.0
7 3 ▶use Carp qw( croak );
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 # ABSTRACT: Test::SpellCheck plugin override for the primary dictionary
10 3 our $VERSION = '0.02'; # VERSION
11  
12  
13 8 ▶sub new ($class, %args)
Subroutine new: called CC=5 SCAR=16.1
Pod documented
14 {
15 8 ▶ croak "must specify affix file" unless defined $args{affix};
Branch: 1 branch
BranchTrueFalseTotal
unless defined $args{"affix"} 1 7 8
16 7 ▶ croak "must specify dictionary file" unless defined $args{dictionary};
Branch: 1 branch
BranchTrueFalseTotal
unless defined $args{"dictionary"} 1 6 7
17 6 ▶ croak "affix file $args{affix} not found" unless -f $args{affix};
Branch: 1 branch
BranchTrueFalseTotal
unless -f $args{"affix"} 1 5 6
18 5 ▶ croak "dictionary $args{dictionary} not found" unless -f $args{dictionary};
Branch: 1 branch
BranchTrueFalseTotal
unless -f $args{"dictionary"} 1 4 5
19 4 bless { affix => $args{affix}, dictionary => $args{dictionary} }, $class;
20 }
21  
22 3 ▶sub primary_dictionary ($self)
Subroutine primary_dictionary: called CC=1 SCAR=0.0
Pod undocumented
23 {
24 3 return ($self->{affix}, $self->{dictionary});
25 }
26  
27 3 1;
28  
29 __END__
« SpellCheck/Plugin/StopWords.pm ↑ Summary SpellCheck/Plugin/Perl.pm »