| 1 | package Unblock::HTTP2; | ||||||||||||||||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||||||||||||||||
| 3 | 5 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 4 | 5 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||||||||||||||||
| 6 | 5 | our $VERSION = '0.13'; | |||||||||||||||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||||||||||||||||
| 8 | 5 | ▶ | use constant { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 9 | 5 | NO_ERROR => 0, | |||||||||||||||||||||||||||||||||||||||||
| 10 | PROTOCOL_ERROR => 1, | ||||||||||||||||||||||||||||||||||||||||||
| 11 | INTERNAL_ERROR => 2, | ||||||||||||||||||||||||||||||||||||||||||
| 12 | FLOW_CONTROL_ERROR => 3, | ||||||||||||||||||||||||||||||||||||||||||
| 13 | SETTINGS_TIMEOUT => 4, | ||||||||||||||||||||||||||||||||||||||||||
| 14 | STREAM_CLOSED => 5, | ||||||||||||||||||||||||||||||||||||||||||
| 15 | FRAME_SIZE_ERROR => 6, | ||||||||||||||||||||||||||||||||||||||||||
| 16 | REFUSED_STREAM => 7, | ||||||||||||||||||||||||||||||||||||||||||
| 17 | CANCEL => 8, | ||||||||||||||||||||||||||||||||||||||||||
| 18 | COMPRESSION_ERROR => 9, | ||||||||||||||||||||||||||||||||||||||||||
| 19 | CONNECT_ERROR => 10, | ||||||||||||||||||||||||||||||||||||||||||
| 20 | ENHANCE_YOUR_CALM => 11, | ||||||||||||||||||||||||||||||||||||||||||
| 21 | INADEQUATE_SECURITY => 12, | ||||||||||||||||||||||||||||||||||||||||||
| 22 | HTTP_1_1_REQUIRED => 13, | ||||||||||||||||||||||||||||||||||||||||||
| 23 | 5 | }; | |||||||||||||||||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||||||||||||||||
| 25 | 5 | my @ERROR_NAME = qw( | |||||||||||||||||||||||||||||||||||||||||
| 26 | NO_ERROR | ||||||||||||||||||||||||||||||||||||||||||
| 27 | PROTOCOL_ERROR | ||||||||||||||||||||||||||||||||||||||||||
| 28 | INTERNAL_ERROR | ||||||||||||||||||||||||||||||||||||||||||
| 29 | FLOW_CONTROL_ERROR | ||||||||||||||||||||||||||||||||||||||||||
| 30 | SETTINGS_TIMEOUT | ||||||||||||||||||||||||||||||||||||||||||
| 31 | STREAM_CLOSED | ||||||||||||||||||||||||||||||||||||||||||
| 32 | FRAME_SIZE_ERROR | ||||||||||||||||||||||||||||||||||||||||||
| 33 | REFUSED_STREAM | ||||||||||||||||||||||||||||||||||||||||||
| 34 | CANCEL | ||||||||||||||||||||||||||||||||||||||||||
| 35 | COMPRESSION_ERROR | ||||||||||||||||||||||||||||||||||||||||||
| 36 | CONNECT_ERROR | ||||||||||||||||||||||||||||||||||||||||||
| 37 | ENHANCE_YOUR_CALM | ||||||||||||||||||||||||||||||||||||||||||
| 38 | INADEQUATE_SECURITY | ||||||||||||||||||||||||||||||||||||||||||
| 39 | HTTP_1_1_REQUIRED | ||||||||||||||||||||||||||||||||||||||||||
| 40 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||||||||||||||||
| 42 | 4 | ▶ | sub error_name { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
error_name: called CC=4 SCAR=17.1
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 43 | 4 | my ($class, $code) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 44 | 4 | ▶ | return unless defined($code) && !ref($code) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%2/6
defined $code and not ref $code and "$code" =~ /\A[0-9]+\z/
defined $code and not ref $code
MC/DC0%0/3
defined $code and not ref $code and "$code" =~ /\A[0-9]+\z/
defined $code
not ref $code
"$code" =~ /\A[0-9]+\z/
Truth table25%1/4
A and not(B) and C
A= defined $codeB= not ref $codeC= "$code" =~ /\A[0-9]+\z/
| |||||||||||||||||||||||||||||||||||||||||||
| 45 | && "$code" =~ /\A[0-9]+\z/; | ||||||||||||||||||||||||||||||||||||||||||
| 46 | 4 | return $ERROR_NAME[0 + $code]; | |||||||||||||||||||||||||||||||||||||||||
| 47 | } | ||||||||||||||||||||||||||||||||||||||||||
| 48 | |||||||||||||||||||||||||||||||||||||||||||
| 49 | 5 | 1; | |||||||||||||||||||||||||||||||||||||||||
| 50 | |||||||||||||||||||||||||||||||||||||||||||
| 51 | __END__ | ||||||||||||||||||||||||||||||||||||||||||