HTTP2/X/HTTP2.pm

filter: Statementstmt 100% 16 / 16 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod n/a totaltotal 100% 21 / 21 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« HTTP2/X/Base.pm ↑ Summary
1 package Net::HTTP2::X::HTTP2;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 =encoding utf-8
7  
8 =head1 NAME
9  
10 Net::HTTP2::X::HTTP2 - Protocol-level errors for L<Net::HTTP2>
11  
12 =head1 DESCRIPTION
13  
14 This class extends L<Net::HTTP2::X::Base> and represents protocol-level
15 errors from HTTP itself.
16  
17 =head1 PROPERTIES
18  
19 (See L<X::Tiny::Base> for how to access these.)
20  
21 =over
22  
23 =item * C<error_number>
24  
25 =item * C<error_name>
26  
27 =back
28  
29 =cut
30  
31 #----------------------------------------------------------------------
32  
33 1 ▶use parent 'Net::HTTP2::X::Base';
Subroutine BEGIN: called CC=1 SCAR=0.0
34  
35 1 ▶use Protocol::HTTP2::Constants ();
Subroutine BEGIN: called CC=1 SCAR=0.0
36  
37 1 ▶sub _new {
Subroutine _new: called CC=1 SCAR=0.0
38 1 my ($class, $errnum) = @_;
39  
40 1 my $errname = Protocol::HTTP2::Constants::const_name( errors => $errnum );
41  
42 1 return $class->SUPER::_new(
43 "HTTP/2 error: $errname",
44 error_number => $errnum,
45 error_name => $errname,
46 );
47 }
48  
49 1 1;
« HTTP2/X/Base.pm ↑ Summary