Perlito5/Match.pm untested

filter: Statementstmt 0.0% 0 / 11 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 3 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 17 CC 2 SCAR 13.9
CC
2
Cov
0%
flat
6.0
BEGIN
2.0
BEGIN
2.0
CRAP 4.0
1 use v5;
2  
3 package Perlito5::Match;
4 use strict;
5  
6 sub flat {
7 my $self = $_[0];
8 return $self->{capture} if defined( $self->{capture} );
9 return join( "",
10 @{ $self->{str} }[ $self->{from} .. $self->{to} - 1 ]
11 );
12 }
13  
14 1;
15  
16 =begin
17  
18 =head1 NAME
19  
20 Perlito5::Match - Runtime for Perlito Perl5-in-JavaScript grammars
21  
22 =head1 AUTHORS
23  
24 Flavio Soibelmann Glock <fglock@gmail.com>.
25  
26 =head1 COPYRIGHT
27  
28 Copyright 2009, 2011, 2012 by Flavio Soibelmann Glock.
29  
30 This program is free software; you can redistribute it and/or modify it
31 under the same terms as Perl itself.
32  
33 See L<http://www.perl.com/perl/misc/Artistic.html>
34  
35 =end