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 18     18   135 use strict;
  18         31  
  18         624  
4 18     18   76 use warnings;
  18         27  
  18         1255  
5              
6             my $ENUM;
7 18     18   615 BEGIN { $ENUM = 0 }
8              
9 18     18   96 use constant RPe_ZQUANT => --$ENUM, 'Quantifier unexpected on zero-length expression';
  18         27  
  18         2090  
10 18     18   102 use constant RPe_NOTIMP => --$ENUM, 'Sequence (?%.*s...) not implemented';
  18         40  
  18         1040  
11 18     18   83 use constant RPe_NOTERM => --$ENUM, 'Sequence (?#... not terminated';
  18         31  
  18         939  
12 18     18   130 use constant RPe_LOGDEP => --$ENUM, '(?p{}) is deprecated -- use (??{})';
  18         147  
  18         1012  
13 18     18   93 use constant RPe_NOTBAL => --$ENUM, 'Sequence (?{...}) not terminated or not {}-balanced';
  18         28  
  18         902  
14 18     18   73 use constant RPe_SWNREC => --$ENUM, 'Switch condition not recognized';
  18         25  
  18         837  
15 18     18   75 use constant RPe_SWBRAN => --$ENUM, 'Switch (?(condition)... contains too many branches';
  18         32  
  18         897  
16 18     18   83 use constant RPe_SWUNKN => --$ENUM, 'Unknown switch condition (?(%.2s';
  18         24  
  18         937  
17 18     18   79 use constant RPe_SEQINC => --$ENUM, 'Sequence (? incomplete';
  18         44  
  18         839  
18 18     18   78 use constant RPe_BADFLG => --$ENUM, 'Useless (?%s%s) -- %suse /%s modifier';
  18         30  
  18         1041  
19 18     18   91 use constant RPe_NOTREC => --$ENUM, 'Sequence (?%.*s...) not recognized';
  18         60  
  18         916  
20 18     18   147 use constant RPe_LPAREN => --$ENUM, 'Unmatched (';
  18         1264  
  18         896  
21 18     18   79 use constant RPe_RPAREN => --$ENUM, 'Unmatched )';
  18         26  
  18         760  
22 18     18   77 use constant RPe_BCURLY => --$ENUM, 'Can\'t do {n,m} with n > m';
  18         47  
  18         842  
23 18     18   80 use constant RPe_NULNUL => --$ENUM, '%s matches null string many times';
  18         28  
  18         793  
24 18     18   80 use constant RPe_NESTED => --$ENUM, 'Nested quantifiers';
  18         28  
  18         1032  
25 18     18   106 use constant RPe_LBRACK => --$ENUM, 'Unmatched [';
  18         25  
  18         773  
26 18     18   92 use constant RPe_EQUANT => --$ENUM, 'Quantifier follows nothing';
  18         123  
  18         912  
27 18     18   129 use constant RPe_BRACES => --$ENUM, 'Missing braces on \%s{}';
  18         58  
  18         979  
28 18     18   80 use constant RPe_RBRACE => --$ENUM, 'Missing right brace on \%s{}';
  18         27  
  18         862  
29 18     18   91 use constant RPe_BGROUP => --$ENUM, 'Reference to nonexistent group';
  18         43  
  18         961  
30 18     18   80 use constant RPe_ESLASH => --$ENUM, 'Trailing \\';
  18         27  
  18         995  
31 18     18   99 use constant RPe_BADESC => --$ENUM, 'Unrecognized escape \\%s%s passed through';
  18         25  
  18         892  
32 18     18   98 use constant RPe_BADPOS => --$ENUM, 'POSIX class [:%s:] unknown';
  18         36  
  18         859  
33 18     18   96 use constant RPe_OUTPOS => --$ENUM, 'POSIX syntax [%s %s] belongs inside character classes';
  18         32  
  18         827  
34 18     18   78 use constant RPe_EMPTYB => --$ENUM, 'Empty \%s{}';
  18         27  
  18         777  
35 18     18   85 use constant RPe_FRANGE => --$ENUM, 'False [] range "%s-%s"';
  18         38  
  18         1036  
36 18     18   83 use constant RPe_IRANGE => --$ENUM, 'Invalid [] range "%s-%s"';
  18         27  
  18         2222  
37              
38             1;