| 1 | 3 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 2 | 3 | ▶ | use warnings FATAL => 'all'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 3 | |||||||||||||
| 4 | package MarpaX::ESLIF::JSON::Decoder::RecognizerInterface; | ||||||||||||
| 5 | 3 | ▶ | use Carp qw/croak/; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 6 | |||||||||||||
| 7 | # ABSTRACT: MarpaX::ESLIF::JSON Recognizer Interface | ||||||||||||
| 8 | |||||||||||||
| 9 | 3 | our $VERSION = '6.0.35.1'; # VERSION | |||||||||||
| 10 | |||||||||||||
| 11 | 3 | our $AUTHORITY = 'cpan:JDDPAUSE'; # AUTHORITY | |||||||||||
| 12 | |||||||||||||
| 13 | |||||||||||||
| 14 | |||||||||||||
| 15 | # ============================================================================ | ||||||||||||
| 16 | # new | ||||||||||||
| 17 | # ============================================================================ | ||||||||||||
| 18 | |||||||||||||
| 19 | |||||||||||||
| 20 | 0 | ▶ | sub new { | ||||||||||
|
Subroutine
new: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||
| 21 | 0 | my ($pkg, $string, $encoding) = @_; | |||||||||||
| 22 | |||||||||||||
| 23 | 0 | ▶ | return bless { input => $string // '', encoding => $encoding }, $pkg | ||||||||||
|
Condition0%0/2
$string // ""
MC/DC0%0/1
$string // ""
$string
Truth table0%0/2
A
A= $string
| |||||||||||||
| 24 | } | ||||||||||||
| 25 | |||||||||||||
| 26 | |||||||||||||
| 27 | # ============================================================================ | ||||||||||||
| 28 | # read | ||||||||||||
| 29 | # ============================================================================ | ||||||||||||
| 30 | |||||||||||||
| 31 | |||||||||||||
| 32 | 0 | ▶ | sub read { | ||||||||||
|
Subroutine
read: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 33 | 0 | return 1 # First read callback will be ok | |||||||||||
| 34 | } | ||||||||||||
| 35 | |||||||||||||
| 36 | # ============================================================================ | ||||||||||||
| 37 | # isEof | ||||||||||||
| 38 | # ============================================================================ | ||||||||||||
| 39 | |||||||||||||
| 40 | |||||||||||||
| 41 | 0 | ▶ | sub isEof { | ||||||||||
|
Subroutine
isEof: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 42 | 0 | return 1 # ../. and we will say this is EOF | |||||||||||
| 43 | } | ||||||||||||
| 44 | |||||||||||||
| 45 | # ============================================================================ | ||||||||||||
| 46 | # isCharacterStream | ||||||||||||
| 47 | # ============================================================================ | ||||||||||||
| 48 | |||||||||||||
| 49 | |||||||||||||
| 50 | 0 | ▶ | sub isCharacterStream { | ||||||||||
|
Subroutine
isCharacterStream: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 51 | 0 | return 1 # MarpaX::ESLIF will validate the input | |||||||||||
| 52 | } | ||||||||||||
| 53 | |||||||||||||
| 54 | # ============================================================================ | ||||||||||||
| 55 | # encoding | ||||||||||||
| 56 | # ============================================================================ | ||||||||||||
| 57 | |||||||||||||
| 58 | |||||||||||||
| 59 | 0 | ▶ | sub encoding { | ||||||||||
|
Subroutine
encoding: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 60 | return $_[0]->{encoding} # Let MarpaX::ESLIF guess eventually - undef is ok | ||||||||||||
| 61 | 0 | } | |||||||||||
| 62 | |||||||||||||
| 63 | # ============================================================================ | ||||||||||||
| 64 | # data | ||||||||||||
| 65 | # ============================================================================ | ||||||||||||
| 66 | |||||||||||||
| 67 | |||||||||||||
| 68 | 0 | ▶ | sub data { | ||||||||||
|
Subroutine
data: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||
| 69 | 0 | ▶ | return $_[0]->{input} // croak 'Undefined input' # Data itself | ||||||||||
|
Condition0%0/2
$_[0]{"input"} // croak("Undefined input")
MC/DC0%0/1
$_[0]{"input"} // croak("Undefined input")
$_[0]{"input"}
Truth table0%0/2
A
A= $_[0]{"input"}
| |||||||||||||
| 70 | } | ||||||||||||
| 71 | |||||||||||||
| 72 | # ============================================================================ | ||||||||||||
| 73 | # isWithDisableThreshold | ||||||||||||
| 74 | # ============================================================================ | ||||||||||||
| 75 | |||||||||||||
| 76 | |||||||||||||
| 77 | 0 | ▶ | sub isWithDisableThreshold { | ||||||||||
|
Subroutine
isWithDisableThreshold: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 78 | 0 | return 0 | |||||||||||
| 79 | } | ||||||||||||
| 80 | |||||||||||||
| 81 | # ============================================================================ | ||||||||||||
| 82 | # isWithExhaustion | ||||||||||||
| 83 | # ============================================================================ | ||||||||||||
| 84 | |||||||||||||
| 85 | |||||||||||||
| 86 | 0 | ▶ | sub isWithExhaustion { | ||||||||||
|
Subroutine
isWithExhaustion: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||
| 87 | 0 | ▶ | return $_[0]->{exhaustion} // 0 | ||||||||||
|
Condition0%0/2
$_[0]{"exhaustion"} // 0
MC/DC0%0/1
$_[0]{"exhaustion"} // 0
$_[0]{"exhaustion"}
Truth table0%0/2
A
A= $_[0]{"exhaustion"}
| |||||||||||||
| 88 | } | ||||||||||||
| 89 | |||||||||||||
| 90 | # ============================================================================ | ||||||||||||
| 91 | # isWithNewline | ||||||||||||
| 92 | # ============================================================================ | ||||||||||||
| 93 | |||||||||||||
| 94 | |||||||||||||
| 95 | 0 | ▶ | sub isWithNewline { | ||||||||||
|
Subroutine
isWithNewline: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 96 | 0 | return 1 | |||||||||||
| 97 | } | ||||||||||||
| 98 | |||||||||||||
| 99 | # ============================================================================ | ||||||||||||
| 100 | # isWithTrack | ||||||||||||
| 101 | # ============================================================================ | ||||||||||||
| 102 | |||||||||||||
| 103 | |||||||||||||
| 104 | 0 | ▶ | sub isWithTrack { | ||||||||||
|
Subroutine
isWithTrack: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 105 | 0 | return 0 | |||||||||||
| 106 | } | ||||||||||||
| 107 | |||||||||||||
| 108 | 3 | 1; | |||||||||||
| 109 | |||||||||||||
| 110 | __END__ | ||||||||||||