blib/lib/Getopt/ArgParse/ActionCount.pm untested

filter: Statementstmt 0.0% 0 / 15 Branchbran n/a Conditioncond 0.0% 0 / 4 MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 24 SCAR 6.9
CC
1
Cov
0%
apply
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package Getopt::ArgParse::ActionCount;
2  
3 use strict;
4 use warnings;
5 use Carp;
6  
7 sub apply {
8 my $self = shift;
9  
10 my ($spec, $namespace, $values) = @_;
11  
12 $values ||= [];
13  
14 my $v = $namespace->get_attr($spec->{dest}) || 0;
15  
16 $namespace->set_attr( $spec->{dest}, $v + scalar(@$values) );
17  
18 return '';
19 }
20  
21 1;
22  
23 =head1 AUTHOR
24  
25 Mytram <mytram2@gmail.com> (original author)
26  
27 =head1 COPYRIGHT AND LICENSE
28  
29 This software is Copyright (c) 2014 by Mytram.
30  
31 This is free software, licensed under:
32  
33 The Artistic License 2.0 (GPL Compatible)
34  
35 =cut