File Coverage

lib/Code/Statistics/Metric/lines.pm
Criterion Covered Total %
statement 12 12 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod 1 1 100.0
total 17 17 100.0


line stmt bran cond sub pod time code
1 1     1   631 use strict;
  1         2  
  1         40  
2 1     1   6 use warnings;
  1         2  
  1         44  
3              
4             package Code::Statistics::Metric::lines;
5             $Code::Statistics::Metric::lines::VERSION = '1.190680';
6             # ABSTRACT: measures the line count of a target
7              
8 1     1   5 use Moose;
  1         2  
  1         11  
9             extends 'Code::Statistics::Metric';
10              
11              
12             sub measure {
13 76     76 1 111 my ( $class, $target ) = @_;
14 76         153 my @lines = split /\n/, $target->content;
15 76         10661 return scalar @lines;
16             }
17              
18             1;
19              
20             __END__
21              
22             =pod
23              
24             =encoding UTF-8
25              
26             =head1 NAME
27              
28             Code::Statistics::Metric::lines - measures the line count of a target
29              
30             =head1 VERSION
31              
32             version 1.190680
33              
34             =head2 measure
35             Returns the line count of the given target.
36              
37             =head1 AUTHOR
38              
39             Christian Walde <mithaldu@yahoo.de>
40              
41             =head1 COPYRIGHT AND LICENSE
42              
43              
44             Christian Walde has dedicated the work to the Commons by waiving all of his
45             or her rights to the work worldwide under copyright law and all related or
46             neighboring legal rights he or she had in the work, to the extent allowable by
47             law.
48              
49             Works under CC0 do not require attribution. When citing the work, you should
50             not imply endorsement by the author.
51              
52             =cut