API/Languages.pm

filter: Statementstmt 92.5% 37 / 40 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 86.6% 13 / 15 Podpod 0.0% 0 / 4 totaltotal 84.7% 50 / 59 CC 1 SCAR 1.3
CC
1
Cov
92%
is_allowed_sort
2.0
__ANON__
2.0
BEGIN
1.0
CRAP 1.1
« API/Enlistments.pm ↑ Summary API/ActivityFacts.pm »
1 package WWW::Ohloh::API::Languages;
2 29 our $AUTHORITY = 'cpan:YANICK';
3  
4 29 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 29 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 29 ▶use Object::InsideOut qw/ WWW::Ohloh::API::Collection /;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 29 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 29 ▶use XML::LibXML;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 29 ▶use Readonly;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 29 ▶use List::MoreUtils qw/ any /;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 29 ▶use WWW::Ohloh::API::Language;
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 29 our $VERSION = '1.0_1';
16  
17 29 my @ALLOWED_SORTING;
18 3 Readonly @ALLOWED_SORTING =>
19 qw/ total code projects comment_ratio contributors commits name /;
20  
21 1 ▶sub element { return 'WWW::Ohloh::API::Language' }
Subroutine element: called CC=1 SCAR=0.0
Pod undocumented
22 1 ▶sub element_name { return 'language' }
Subroutine element_name: called CC=1 SCAR=0.0
Pod undocumented
23 1 ▶sub query_path { return 'languages.xml' }
Subroutine query_path: called CC=1 SCAR=0.0
Pod undocumented
24  
25 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
26  
27 0 ▶sub is_allowed_sort {
Subroutine is_allowed_sort: not called CC=1 SCAR=6.9
Pod undocumented
28 0 my $s = shift;
29 0 ▶ return any { $s eq $_ } @ALLOWED_SORTING;
Subroutine __ANON__: not called CC=1 SCAR=6.9
30 }
31  
32 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33  
34 3 ▶sub _init : Init {
Subroutine _init: called CC=1 SCAR=0.0
35 29 my $self = shift;
36  
37 29 return;
38 29 ▶}
Subroutine BEGIN: called CC=1 SCAR=0.0
39  
40 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
41  
42 3 'end of WWW::Ohloh::API::Languages';
43  
44 __END__
« API/Enlistments.pm ↑ Summary API/ActivityFacts.pm »