| blib/lib/Perl/Lexer.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| statement | 27 | 28 | 96.4 |
| branch | n/a | ||
| condition | n/a | ||
| subroutine | 10 | 10 | 100.0 |
| pod | 2 | 2 | 100.0 |
| total | 39 | 40 | 97.5 |
| line | stmt | bran | cond | sub | pod | time | code |
|---|---|---|---|---|---|---|---|
| 1 | package Perl::Lexer; | ||||||
| 2 | 3 | 3 | 149522 | use 5.010000; | |||
| 3 | 30 | ||||||
| 3 | 3 | 3 | 17 | use strict; | |||
| 3 | 5 | ||||||
| 3 | 69 | ||||||
| 4 | 3 | 3 | 41 | use warnings; | |||
| 3 | 6 | ||||||
| 3 | 107 | ||||||
| 5 | 3 | 3 | 16 | use B; | |||
| 3 | 6 | ||||||
| 3 | 209 | ||||||
| 6 | |||||||
| 7 | our $VERSION = "0.35"; | ||||||
| 8 | |||||||
| 9 | 3 | 3 | 1546 | use parent qw(Exporter); | |||
| 3 | 1009 | ||||||
| 3 | 17 | ||||||
| 10 | |||||||
| 11 | our @EXPORT = qw( | ||||||
| 12 | TOKENTYPE_NONE | ||||||
| 13 | TOKENTYPE_IVAL | ||||||
| 14 | TOKENTYPE_OPNUM | ||||||
| 15 | TOKENTYPE_PVAL | ||||||
| 16 | TOKENTYPE_OPVAL | ||||||
| 17 | ); | ||||||
| 18 | |||||||
| 19 | 3 | 3 | 1463 | use Perl::Lexer::Token; | |||
| 3 | 8 | ||||||
| 3 | 93 | ||||||
| 20 | |||||||
| 21 | 3 | 3 | 21 | use XSLoader; | |||
| 3 | 6 | ||||||
| 3 | 350 | ||||||
| 22 | XSLoader::load(__PACKAGE__, $VERSION); | ||||||
| 23 | |||||||
| 24 | sub new { | ||||||
| 25 | 4 | 4 | 1 | 9640 | my $class = shift; | ||
| 26 | 4 | 23 | bless {}, $class; | ||||
| 27 | } | ||||||
| 28 | |||||||
| 29 | sub scan_string { | ||||||
| 30 | 4 | 4 | 1 | 12 | my ($self, $str) = @_; | ||
| 31 | 4 | 2 | 189 | open my $fh, '<', \$str; | |||
| 2 | 19 | ||||||
| 2 | 4 | ||||||
| 2 | 14 | ||||||
| 32 | 0 | 0 | $self->scan_fh($fh); | ||||
| 33 | } | ||||||
| 34 | |||||||
| 35 | 4649; | ||||||
| 36 | __END__ |