| 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
| |||||||||||||||||||||
| 49 | |||||||||||||||||||||
| 50 | defined $arg{explanation} | ||||||||||||||||||||
| 51 | 0 | ▶ | and $self->{explanation} = $arg{explanation}; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 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
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
| |||||||||||||||||||||
| 63 | } | ||||||||||||||||||||
| 64 | |||||||||||||||||||||
| 65 | 9 | *__PPIX_ELEM__post_reblessing = \&PPIx::Regexp::Util::__post_rebless_error; | |||||||||||||||||||
| 66 | |||||||||||||||||||||
| 67 | 9 | 1; | |||||||||||||||||||
| 68 | |||||||||||||||||||||
| 69 | __END__ | ||||||||||||||||||||