File Coverage

lib/Code/Statistics/Metric/col.pm
Criterion Covered Total %
statement 14 14 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod 2 2 100.0
total 21 21 100.0


line stmt bran cond sub pod time code
1 1     1   1007 use strict;
  1         2  
  1         48  
2 1     1   7 use warnings;
  1         2  
  1         66  
3              
4             package Code::Statistics::Metric::col;
5             {
6             $Code::Statistics::Metric::col::VERSION = '1.112980';
7             }
8              
9             # ABSTRACT: measures the starting column of a target
10              
11 1     1   6 use Moose;
  1         2  
  1         9  
12             extends 'Code::Statistics::Metric';
13              
14              
15             sub measure {
16 76     76 1 137 my ( $class, $target ) = @_;
17 76         279 my $line = $target->location->[2];
18 76         29314 return $line;
19             }
20              
21              
22             sub is_insignificant {
23 3     3 1 5 my ( $class ) = @_;
24 3         16 return 1;
25             }
26              
27             1;
28              
29             __END__
30             =pod
31              
32             =head1 NAME
33              
34             Code::Statistics::Metric::col - measures the starting column of a target
35              
36             =head1 VERSION
37              
38             version 1.112980
39              
40             =head2 measure
41             Returns the starting column of the given target.
42              
43             =head2 is_insignificant
44             Returns true if the metric is considered statistically insignificant.
45              
46             Returns false for this class, since it only identifies the location of a
47             target.
48              
49             =head1 AUTHOR
50              
51             Christian Walde <mithaldu@yahoo.de>
52              
53             =head1 COPYRIGHT AND LICENSE
54              
55             This software is Copyright (c) 2010 by Christian Walde.
56              
57             This is free software, licensed under:
58              
59             DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE, Version 2, December 2004
60              
61             =cut
62