File Coverage

blib/lib/WWW/Ohloh/API/Languages.pm
Criterion Covered Total %
statement 30 35 85.7
branch n/a
condition n/a
subroutine 12 15 80.0
pod 0 4 0.0
total 42 54 77.7


line stmt bran cond sub pod time code
1             package WWW::Ohloh::API::Languages;
2             our $AUTHORITY = 'cpan:YANICK';
3              
4 29     29   239069 use strict;
  29         69  
  29         1214  
5 29     29   152 use warnings;
  29         59  
  29         1940  
6              
7 29     29   1171 use Object::InsideOut qw/ WWW::Ohloh::API::Collection /;
  29         42781  
  29         210  
8              
9 29     29   4027 use Carp;
  29         69  
  29         2116  
10 29     29   762 use XML::LibXML;
  29         30643  
  29         367  
11 29     29   6414 use Readonly;
  29         3353  
  29         1807  
12 29     29   705 use List::MoreUtils qw/ any /;
  29         11951  
  29         372  
13 29     29   39284 use WWW::Ohloh::API::Language;
  29         119  
  29         220  
14              
15             our $VERSION = '1.0_1';
16              
17             my @ALLOWED_SORTING;
18             Readonly @ALLOWED_SORTING =>
19             qw/ total code projects comment_ratio contributors commits name /;
20              
21 1     1 0 2 sub element { return 'WWW::Ohloh::API::Language' }
22 1     1 0 7 sub element_name { return 'language' }
23 1     1 0 8 sub query_path { return 'languages.xml' }
24              
25             #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
26              
27             sub is_allowed_sort {
28 0     0 0   my $s = shift;
29 0     0     return any { $s eq $_ } @ALLOWED_SORTING;
  0            
30             }
31              
32             #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33              
34             sub _init : Init {
35 0     0     my $self = shift;
36              
37 0           return;
38 29     29   7778 }
  29         108  
  29         190  
39              
40             #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
41              
42             'end of WWW::Ohloh::API::Languages';
43              
44             __END__