Perl/Metrics2/Plugin/Deprecated.pm untested

filter: Statementstmt 0.0% 0 / 19 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 0.0% 0 / 6 Podpod 0.0% 0 / 3 totaltotal 0.0% 0 / 35 CC 2 SCAR 11.5
CC
2
Cov
0%
process_metrics
6.0
BEGIN
2.0
destructive
2.0
CRAP 3.1
1 package Perl::Metrics2::Plugin::Deprecated;
2  
3  
4 use strict;
5 use Perl::Metrics2::Plugin ();
6  
7 use vars qw{$VERSION @ISA};
8 BEGIN {
9 $VERSION = '0.06';
10 @ISA = 'Perl::Metrics2::Plugin';
11 }
12  
13 sub destructive { 0 }
14  
15 sub process_metrics {
16 my $self = shift;
17 my $document = shift;
18 my %metric = ();
19  
20 # Look for the use of $[
21 $metric{array_first_element_index} = $document->find_any( sub {
22 $_[1]->isa('PPI::Token::Magic')
23 and
24 $_[1]->content eq '$['
25 } ) ? 1 : 0;
26  
27 return %metric;
28 }
29  
30 1;
31  
32 __END__