File Coverage

blib/lib/Parse/RecDescent/Consumer.pm
Criterion Covered Total %
statement 6 12 50.0
branch n/a
condition n/a
subroutine 2 4 50.0
pod n/a
total 8 16 50.0


line stmt bran cond sub pod time code
1             package Parse::RecDescent::Consumer;
2              
3             require 5.005_62;
4 1     1   760 use strict;
  1         2  
  1         34  
5 1     1   5 use warnings;
  1         2  
  1         277  
6              
7             require Exporter;
8              
9             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             our %EXPORT_TAGS = ( 'all' => [ qw(&Consumer
19            
20             ) ] );
21              
22             our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
23              
24             our @EXPORT = qw(&Consumer
25            
26             );
27              
28             our $VERSION = sprintf '%2d.%02d', q$Revision: 1.3 $ =~ /(\d+)\.(\d+)/;
29              
30              
31             # Preloaded methods go here.
32             sub Parse::RecDescent::Consumer {
33 0     0     my $text=shift;
34             my $closure = sub {
35 0     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;
43             __END__