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 14     14   94 use strict;
  14         25  
  14         532  
4 14     14   70 use warnings;
  14         27  
  14         941  
5              
6             my $ENUM;
7 14     14   517 BEGIN { $ENUM = 0 }
8              
9 14     14   75 use constant RPe_ZQUANT => --$ENUM, 'Quantifier unexpected on zero-length expression';
  14         26  
  14         1850  
10 14     14   89 use constant RPe_NOTIMP => --$ENUM, 'Sequence (?%.*s...) not implemented';
  14         25  
  14         950  
11 14     14   100 use constant RPe_NOTERM => --$ENUM, 'Sequence (?#... not terminated';
  14         25  
  14         921  
12 14     14   128 use constant RPe_LOGDEP => --$ENUM, '(?p{}) is deprecated -- use (??{})';
  14         109  
  14         893  
13 14     14   105 use constant RPe_NOTBAL => --$ENUM, 'Sequence (?{...}) not terminated or not {}-balanced';
  14         28  
  14         728  
14 14     14   69 use constant RPe_SWNREC => --$ENUM, 'Switch condition not recognized';
  14         21  
  14         866  
15 14     14   72 use constant RPe_SWBRAN => --$ENUM, 'Switch (?(condition)... contains too many branches';
  14         23  
  14         795  
16 14     14   85 use constant RPe_SWUNKN => --$ENUM, 'Unknown switch condition (?(%.2s';
  14         25  
  14         712  
17 14     14   62 use constant RPe_SEQINC => --$ENUM, 'Sequence (? incomplete';
  14         32  
  14         772  
18 14     14   69 use constant RPe_BADFLG => --$ENUM, 'Useless (?%s%s) -- %suse /%s modifier';
  14         36  
  14         954  
19 14     14   80 use constant RPe_NOTREC => --$ENUM, 'Sequence (?%.*s...) not recognized';
  14         31  
  14         874  
20 14     14   99 use constant RPe_LPAREN => --$ENUM, 'Unmatched (';
  14         37  
  14         884  
21 14     14   81 use constant RPe_RPAREN => --$ENUM, 'Unmatched )';
  14         24  
  14         703  
22 14     14   67 use constant RPe_BCURLY => --$ENUM, 'Can\'t do {n,m} with n > m';
  14         23  
  14         745  
23 14     14   70 use constant RPe_NULNUL => --$ENUM, '%s matches null string many times';
  14         23  
  14         682  
24 14     14   67 use constant RPe_NESTED => --$ENUM, 'Nested quantifiers';
  14         24  
  14         857  
25 14     14   75 use constant RPe_LBRACK => --$ENUM, 'Unmatched [';
  14         22  
  14         662  
26 14     14   108 use constant RPe_EQUANT => --$ENUM, 'Quantifier follows nothing';
  14         111  
  14         869  
27 14     14   143 use constant RPe_BRACES => --$ENUM, 'Missing braces on \%s{}';
  14         50  
  14         850  
28 14     14   73 use constant RPe_RBRACE => --$ENUM, 'Missing right brace on \%s{}';
  14         22  
  14         758  
29 14     14   88 use constant RPe_BGROUP => --$ENUM, 'Reference to nonexistent group';
  14         37  
  14         761  
30 14     14   74 use constant RPe_ESLASH => --$ENUM, 'Trailing \\';
  14         24  
  14         879  
31 14     14   68 use constant RPe_BADESC => --$ENUM, 'Unrecognized escape \\%s%s passed through';
  14         25  
  14         902  
32 14     14   79 use constant RPe_BADPOS => --$ENUM, 'POSIX class [:%s:] unknown';
  14         25  
  14         822  
33 14     14   92 use constant RPe_OUTPOS => --$ENUM, 'POSIX syntax [%s %s] belongs inside character classes';
  14         26  
  14         721  
34 14     14   71 use constant RPe_EMPTYB => --$ENUM, 'Empty \%s{}';
  14         26  
  14         803  
35 14     14   87 use constant RPe_FRANGE => --$ENUM, 'False [] range "%s-%s"';
  14         44  
  14         930  
36 14     14   71 use constant RPe_IRANGE => --$ENUM, 'Invalid [] range "%s-%s"';
  14         24  
  14         844  
37              
38             1;