StopWords.pm

filter: Statementstmt 100% 25 / 25 Branchbran 83.3% 5 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 100% 1 / 1 totaltotal 97.2% 35 / 36 CC 4 SCAR 10.0
CC
4
Cov
97%
getStopWords
4.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.7
↑ Summary StopWords/DA.pm »
1 package Lingua::StopWords;
2 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 3 require Exporter;
6 3 our @ISA = qw(Exporter);
7 3 our %EXPORT_TAGS = ( 'all' => [ qw( getStopWords ) ] );
8 3 our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
9 3 our $VERSION = 0.12;
10  
11 33 ▶sub getStopWords {
Subroutine getStopWords: called CC=4 SCAR=13.9
Pod documented
12 33 my ( $language, $encoding ) = @_;
13  
14 33 ▶ return undef unless $language;
Branch: 1 branch
BranchTrueFalseTotal
unless $language 0 33 33
15  
16 33 $language = uc($language);
17 33 eval { require "Lingua/StopWords/$language.pm"; };
18 33 ▶ return undef if $@;
Branch: 1 branch
BranchTrueFalseTotal
if $@ 1 32 33
19  
20 32 ▶ my @args = $encoding ? ($encoding) : ();
Branch: 1 branch
BranchTrueFalseTotal
$encoding ? : 15 17 32
21 3 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
22 32 return &{ "Lingua::StopWords::$language\::getStopWords" }(@args);
23 }
24  
25 3 1;
26  
27 __END__
↑ Summary StopWords/DA.pm »