File Coverage

blib/lib/Regexp/Parser/Diagnostics.pm
Criterion Covered Total %
statement 91 91 100.0
branch n/a
condition n/a
subroutine 31 31 100.0
pod n/a
total 122 122 100.0


line stmt bran cond sub pod time code
1             package Regexp::Parser;
2              
3 16     16   102 use strict;
  16         30  
  16         594  
4 16     16   74 use warnings;
  16         28  
  16         1135  
5              
6             my $ENUM;
7 16     16   524 BEGIN { $ENUM = 0 }
8              
9 16     16   106 use constant RPe_ZQUANT => --$ENUM, 'Quantifier unexpected on zero-length expression';
  16         28  
  16         1861  
10 16     16   88 use constant RPe_NOTIMP => --$ENUM, 'Sequence (?%.*s...) not implemented';
  16         31  
  16         1119  
11 16     16   82 use constant RPe_NOTERM => --$ENUM, 'Sequence (?#... not terminated';
  16         27  
  16         965  
12 16     16   186 use constant RPe_LOGDEP => --$ENUM, '(?p{}) is deprecated -- use (??{})';
  16         101  
  16         891  
13 16     16   88 use constant RPe_NOTBAL => --$ENUM, 'Sequence (?{...}) not terminated or not {}-balanced';
  16         27  
  16         807  
14 16     16   105 use constant RPe_SWNREC => --$ENUM, 'Switch condition not recognized';
  16         24  
  16         818  
15 16     16   73 use constant RPe_SWBRAN => --$ENUM, 'Switch (?(condition)... contains too many branches';
  16         30  
  16         811  
16 16     16   70 use constant RPe_SWUNKN => --$ENUM, 'Unknown switch condition (?(%.2s';
  16         58  
  16         777  
17 16     16   89 use constant RPe_SEQINC => --$ENUM, 'Sequence (? incomplete';
  16         28  
  16         811  
18 16     16   71 use constant RPe_BADFLG => --$ENUM, 'Useless (?%s%s) -- %suse /%s modifier';
  16         25  
  16         1091  
19 16     16   78 use constant RPe_NOTREC => --$ENUM, 'Sequence (?%.*s...) not recognized';
  16         44  
  16         985  
20 16     16   117 use constant RPe_LPAREN => --$ENUM, 'Unmatched (';
  16         88  
  16         830  
21 16     16   75 use constant RPe_RPAREN => --$ENUM, 'Unmatched )';
  16         29  
  16         978  
22 16     16   100 use constant RPe_BCURLY => --$ENUM, 'Can\'t do {n,m} with n > m';
  16         40  
  16         913  
23 16     16   74 use constant RPe_NULNUL => --$ENUM, '%s matches null string many times';
  16         30  
  16         788  
24 16     16   75 use constant RPe_NESTED => --$ENUM, 'Nested quantifiers';
  16         24  
  16         1010  
25 16     16   119 use constant RPe_LBRACK => --$ENUM, 'Unmatched [';
  16         27  
  16         759  
26 16     16   76 use constant RPe_EQUANT => --$ENUM, 'Quantifier follows nothing';
  16         91  
  16         899  
27 16     16   113 use constant RPe_BRACES => --$ENUM, 'Missing braces on \%s{}';
  16         31  
  16         1086  
28 16     16   78 use constant RPe_RBRACE => --$ENUM, 'Missing right brace on \%s{}';
  16         26  
  16         861  
29 16     16   75 use constant RPe_BGROUP => --$ENUM, 'Reference to nonexistent group';
  16         30  
  16         817  
30 16     16   76 use constant RPe_ESLASH => --$ENUM, 'Trailing \\';
  16         25  
  16         869  
31 16     16   70 use constant RPe_BADESC => --$ENUM, 'Unrecognized escape \\%s%s passed through';
  16         23  
  16         809  
32 16     16   78 use constant RPe_BADPOS => --$ENUM, 'POSIX class [:%s:] unknown';
  16         24  
  16         731  
33 16     16   70 use constant RPe_OUTPOS => --$ENUM, 'POSIX syntax [%s %s] belongs inside character classes';
  16         26  
  16         647  
34 16     16   87 use constant RPe_EMPTYB => --$ENUM, 'Empty \%s{}';
  16         21  
  16         750  
35 16     16   115 use constant RPe_FRANGE => --$ENUM, 'False [] range "%s-%s"';
  16         36  
  16         843  
36 16     16   90 use constant RPe_IRANGE => --$ENUM, 'Invalid [] range "%s-%s"';
  16         27  
  16         945  
37              
38             1;