Regexp/Structure/Unknown.pm

filter: Statementstmt 69.2% 18 / 26 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 62.5% 5 / 8 Podpod 100% 2 / 2 totaltotal 55.5% 25 / 45 CC 4 SCAR 16.1
CC
4
Cov
55%
__new
12.0
explain
6.0
width
2.0
CRAP 5.0
« Regexp/Token/Control.pm ↑ Summary Regexp/Structure/BranchReset.pm »
1 =head1 NAME
2  
3 PPIx::Regexp::Structure::Unknown - Represent an unknown structure.
4  
5 =head1 SYNOPSIS
6  
7 use PPIx::Regexp::Dumper;
8 PPIx::Regexp::Dumper->new( 'qr{(?(foo)bar|baz|burfle)}smx' )
9 ->print();
10  
11 =head1 INHERITANCE
12  
13 C<PPIx::Regexp::Structure::Unknown> is a
14 L<PPIx::Regexp::Structure|PPIx::Regexp::Structure>.
15  
16 C<PPIx::Regexp::Structure::Unknown> has no descendants.
17  
18 =head1 DESCRIPTION
19  
20 This class is used for a structure which the lexer recognizes as being
21 improperly constructed.
22  
23 =head1 METHODS
24  
25 This class provides no public methods beyond those provided by its
26 superclass.
27  
28 =cut
29  
30 package PPIx::Regexp::Structure::Unknown;
31  
32 9 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
33 9 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
34  
35 9 ▶use base qw{ PPIx::Regexp::Structure };
Subroutine BEGIN: called CC=1 SCAR=0.0
36  
37 9 ▶use PPIx::Regexp::Constant qw{ @CARP_NOT };
Subroutine BEGIN: called CC=1 SCAR=0.0
38 9 ▶use PPIx::Regexp::Util;
Subroutine BEGIN: called CC=1 SCAR=0.0
39  
40 9 our $VERSION = '0.092';
41  
42 0 ▶sub __new {
Subroutine __new: not called CC=3 SCAR=24.8
43 0 my ( $class, $content, %arg ) = @_;
44  
45 0 my $self = $class->SUPER::__new( $content, %arg );
46  
47 defined $arg{error}
48 0 ▶ and $self->{explanation} = $self->{error} = $arg{error};
Branch: 1 branch
BranchTrueFalseTotal
defined $arg{"error"} and $self->{"explanation"} = $self->{"error"} = $arg{"error"} 0 0 0
49  
50 defined $arg{explanation}
51 0 ▶ and $self->{explanation} = $arg{explanation};
Branch: 1 branch
BranchTrueFalseTotal
defined $arg{"explanation"} and $self->{"explanation"} = $arg{"explanation"} 0 0 0
52  
53 0 return $self;
54 }
55  
56 0 ▶sub width {
Subroutine width: not called CC=1 SCAR=6.9
Pod documented
57 0 return ( undef, undef );
58 }
59  
60 0 ▶sub explain {
Subroutine explain: not called CC=2 SCAR=17.9
Pod documented
61 0 my ( $self ) = @_;
62 0 ▶ return $self->{explanation} || $self->SUPER::explain();
Condition0%0/3
$self->{'explanation'} || $self->SUPER::explain
l!l&&r!l&&!r
000
MC/DC0%0/2
$self->{'explanation'} || $self->SUPER::explain
$self->{'explanation'} $self->SUPER::explain
Truth table0%0/3
A || B
A= $self->{'explanation'}B= $self->SUPER::explain
ABresult
1X1
011
000
63 }
64  
65 9 *__PPIX_ELEM__post_reblessing = \&PPIx::Regexp::Util::__post_rebless_error;
66  
67 9 1;
68  
69 __END__
« Regexp/Token/Control.pm ↑ Summary Regexp/Structure/BranchReset.pm »