| 1 | package Linux::Event::IO::Sock::Listener; | ||||||||||||||||||||||||||||
| 2 | 25 | ▶ | use v5.36; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 3 | 25 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 25 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||
| 6 | 25 | our $VERSION = '0.120'; | |||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||
| 8 | 25 | ▶ | use parent 'Linux::Event::_Socket::Listener'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 9 | 25 | ▶ | use Carp qw(croak); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||
| 11 | 50 | ▶ | sub new ($class, %option) { | ||||||||||||||||||||||||||
|
Subroutine
new: called CC=6 SCAR=19.3
Pod
undocumented
| |||||||||||||||||||||||||||||
| 12 | 50 | ▶ | if (exists $option{stream}) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 13 | croak 'new(): stream must be a hash reference' | ||||||||||||||||||||||||||||
| 14 | 50 | ▶ | if ref($option{stream}) ne 'HASH'; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 15 | 50 | ▶ | if (exists $option{stream}{class}) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 16 | 48 | my $stream_class = $option{stream}{class}; | |||||||||||||||||||||||||||
| 17 | 48 | ▶ | croak 'new(): stream class must name a Linux::Event::IO::Sock::Stream subclass' | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
ref $stream_class or not $stream_class->isa("Linux::Event::IO::Sock::Stream")
MC/DC0%0/2
ref $stream_class or not $stream_class->isa("Linux::Event::IO::Sock::Stream")
ref $stream_class
not $stream_class->isa("Linux::Event::IO::Sock::Stream")
Truth table33%1/3
A or not(B)
A= ref $stream_classB= not $stream_class->isa("Linux::Event::IO::Sock::Stream")
| |||||||||||||||||||||||||||||
| 18 | if ref($stream_class) | ||||||||||||||||||||||||||||
| 19 | || !$stream_class->isa('Linux::Event::IO::Sock::Stream'); | ||||||||||||||||||||||||||||
| 20 | } | ||||||||||||||||||||||||||||
| 21 | } | ||||||||||||||||||||||||||||
| 22 | 50 | return $class->SUPER::new(%option); | |||||||||||||||||||||||||||
| 23 | } | ||||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||
| 25 | 25 | 1; | |||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||
| 27 | __END__ | ||||||||||||||||||||||||||||