blib/lib/Parse/RecDescent/Consumer.pm

filter: Statementstmt 71.4% 15 / 21 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 2 / 4 Podpod n/a totaltotal 68.0% 17 / 25 CC 1 SCAR 4.1
CC
1
Cov
71%
Consumer
2.0
__ANON__
2.0
BEGIN
1.0
CRAP 1.5
↑ Summary
1 package Parse::RecDescent::Consumer;
2  
3 1 require 5.005_62;
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 require Exporter;
8  
9 1 our @ISA = qw(Exporter);
10  
11 # Items to export into callers namespace by default. Note: do not export
12 # names by default without a very good reason. Use EXPORT_OK instead.
13 # Do not simply export all your public functions/methods/constants.
14  
15 # This allows declaration use Parse::RecDescent::Consumer ':all';
16 # If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
17 # will save memory.
18 1 our %EXPORT_TAGS = ( 'all' => [ qw(&Consumer
19
20 ) ] );
21  
22 1 our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
23  
24 1 our @EXPORT = qw(&Consumer
25
26 );
27  
28 1 our $VERSION = sprintf '%2d.%02d', q$Revision: 1.3 $ =~ /(\d+)\.(\d+)/;
29  
30  
31 # Preloaded methods go here.
32 0 ▶ sub Parse::RecDescent::Consumer {
Subroutine Consumer: not called CC=1 SCAR=6.9
33 0 my $text=shift;
34 0 ▶ my $closure = sub {
Subroutine __ANON__: not called CC=1 SCAR=6.9
35 0 my $new_length=length($_[0]);
36 0 my $original_text = $text;
37 0 my $original_length = length($text);
38 0 return substr($original_text, 0, ($original_length-$new_length));
39 }
40 0 }
41  
42 1 1;
43 __END__
↑ Summary