| 1 | # $Id: Signal.pm,v 1.24 2010/03/25 12:52:36 dk Exp $ | ||||||||||||
| 2 | package IO::Lambda::Signal; | ||||||||||||
| 3 | 12 | ▶ | use vars qw(@ISA %SIGDATA); | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 4 | 12 | @ISA = qw(Exporter); | |||||||||||
| 5 | 12 | @EXPORT_OK = qw(signal pid spawn new_signal new_pid new_process); | |||||||||||
| 6 | 12 | %EXPORT_TAGS = ( all => \@EXPORT_OK); | |||||||||||
| 7 | |||||||||||||
| 8 | 12 | ▶ | our $DEBUG = $IO::Lambda::DEBUG{signal} || 0; | ||||||||||
|
Condition50%1/2
$IO::Lambda::DEBUG{'signal'} || 0
MC/DC0%0/1
$IO::Lambda::DEBUG{'signal'} || 0
$IO::Lambda::DEBUG{'signal'}
Truth table50%1/2
A
A= $IO::Lambda::DEBUG{'signal'}
| |||||||||||||
| 9 | |||||||||||||
| 10 | 12 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 11 | 12 | ▶ | use Carp; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 12 | 12 | ▶ | use IO::Handle; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 13 | 12 | ▶ | use POSIX ":sys_wait_h"; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 14 | 12 | ▶ | use IO::Lambda qw(:all :dev); | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 15 | |||||||||||||
| 16 | 12 | my $MASTER = bless {}, __PACKAGE__; | |||||||||||
| 17 | |||||||||||||
| 18 | # register yield handler | ||||||||||||
| 19 | 12 | IO::Lambda::add_loop($MASTER); | |||||||||||
| 20 | 12 | ▶ | END { IO::Lambda::remove_loop($MASTER) }; | ||||||||||
|
Subroutine
END: called CC=1 SCAR=0.0
| |||||||||||||
| 21 | |||||||||||||
| 22 | 867355 | ▶ | sub empty { 0 == keys %SIGDATA } | ||||||||||
|
Subroutine
empty: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||
| 23 | |||||||||||||
| 24 | sub remove | ||||||||||||
| 25 | { | ||||||||||||
| 26 | 3 | ▶ | my $lambda = $_[1]; | ||||||||||
|
Subroutine
remove: called CC=5 SCAR=16.1
Pod
undocumented
| |||||||||||||
| 27 | 3 | my %rec; | |||||||||||
| 28 | 3 | keys %SIGDATA; | |||||||||||
| 29 | 3 | ▶ | while ( my ($id, $v) = each %SIGDATA) { | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 30 | 1 | for my $r (@{$v-> {lambdas}}) { | |||||||||||
| 31 | 1 | push @{$rec{$id}}, $r-> [0]; | |||||||||||
| 32 | } | ||||||||||||
| 33 | } | ||||||||||||
| 34 | 3 | ▶ | while ( my ($id, $v) = each %rec) { | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 35 | 1 | unwatch_signal( $id, $_ ) for @$v; | |||||||||||
| 36 | } | ||||||||||||
| 37 | } | ||||||||||||
| 38 | |||||||||||||
| 39 | sub yield | ||||||||||||
| 40 | { | ||||||||||||
| 41 | 867245 | ▶ | my %v = %SIGDATA; | ||||||||||
|
Subroutine
yield: called CC=8 SCAR=20.9
Pod
undocumented
| |||||||||||||
| 42 | 867245 | for my $id ( keys %v) { | |||||||||||
| 43 | 867245 | my $v = $v{$id}; | |||||||||||
| 44 | # use mutex in case signal happens right here during handling | ||||||||||||
| 45 | 867245 | $v-> {mutex} = 0; | |||||||||||
| 46 | 867245 | ▶ | warn " yield sig $id\n" if $DEBUG > 1; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 47 | AGAIN: | ||||||||||||
| 48 | 867248 | ▶ | next unless $v-> {signal}; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 49 | |||||||||||||
| 50 | 11663 | my @r = @{$v-> {lambdas}}; | |||||||||||
| 51 | 11663 | ▶ | warn " calling ", scalar(@r), " sig handlers\n" if $DEBUG > 1; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 52 | 11663 | for my $r ( @r) { | |||||||||||
| 53 | 16340 | my ( $lambda, $callback, @param) = @$r; | |||||||||||
| 54 | 16340 | $callback-> ( $lambda, @param); | |||||||||||
| 55 | } | ||||||||||||
| 56 | |||||||||||||
| 57 | 11663 | my $sigs = $v-> {mutex}; | |||||||||||
| 58 | 11663 | ▶ | if ( $sigs) { | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 59 | 3 | ▶ | warn " caught $sigs signals during yield\n" if $DEBUG > 1; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 60 | 3 | $v-> {signal} = $sigs; | |||||||||||
| 61 | 3 | $v-> {mutex} -= $sigs; | |||||||||||
| 62 | 3 | goto AGAIN; | |||||||||||
| 63 | } | ||||||||||||
| 64 | } | ||||||||||||
| 65 | } | ||||||||||||
| 66 | |||||||||||||
| 67 | sub signal_handler | ||||||||||||
| 68 | { | ||||||||||||
| 69 | 32 | ▶ | my $id = shift; | ||||||||||
|
Subroutine
signal_handler: called CC=4 SCAR=14.5
Pod
undocumented
| |||||||||||||
| 70 | 32 | ▶ | warn "SIG{$id}\n" if $DEBUG; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 71 | 32 | ▶ | return unless exists $SIGDATA{$id}; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 72 | 32 | $SIGDATA{$id}-> {signal}++; | |||||||||||
| 73 | 32 | $SIGDATA{$id}-> {mutex}++; | |||||||||||
| 74 | 32 | ▶ | $IO::Lambda::LOOP-> signal($id) if $IO::Lambda::LOOP-> can('signal'); | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 75 | } | ||||||||||||
| 76 | |||||||||||||
| 77 | sub watch_signal | ||||||||||||
| 78 | { | ||||||||||||
| 79 | 34 | ▶ | my ($id, $lambda, $callback, @param) = @_; | ||||||||||
|
Subroutine
watch_signal: called CC=4 SCAR=13.9
Pod
undocumented
| |||||||||||||
| 80 | |||||||||||||
| 81 | 34 | my $entry = [ $lambda, $callback, @param ]; | |||||||||||
| 82 | 34 | ▶ | unless ( exists $SIGDATA{$id}) { | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 83 | $SIGDATA{$id} = { | ||||||||||||
| 84 | mutex => 0, | ||||||||||||
| 85 | signal => 0, | ||||||||||||
| 86 | 28 | save => $SIG{$id}, | |||||||||||
| 87 | lambdas => [$entry], | ||||||||||||
| 88 | }; | ||||||||||||
| 89 | 28 | ▶ | $SIG{$id} = sub { signal_handler($id) }; | ||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||
| 90 | 28 | ▶ | warn "install signal handler for $id ", _o($lambda), "\n" if $DEBUG > 1; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 91 | } else { | ||||||||||||
| 92 | 6 | push @{ $SIGDATA{$id}-> {lambdas} }, $entry; | |||||||||||
| 93 | 6 | ▶ | warn "push signal handler for $id ", _o($lambda), "\n" if $DEBUG > 2; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 94 | } | ||||||||||||
| 95 | } | ||||||||||||
| 96 | |||||||||||||
| 97 | sub unwatch_signal | ||||||||||||
| 98 | { | ||||||||||||
| 99 | 34 | ▶ | my ( $id, $lambda) = @_; | ||||||||||
|
Subroutine
unwatch_signal: called CC=6 SCAR=18.4
Pod
undocumented
| |||||||||||||
| 100 | |||||||||||||
| 101 | 34 | ▶ | return unless exists $SIGDATA{$id}; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 102 | |||||||||||||
| 103 | 34 | ▶ | warn "remove signal handler for $id ", _o($lambda), "\n" if $DEBUG > 2; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 104 | |||||||||||||
| 105 | 34 | @{ $SIGDATA{$id}-> {lambdas} } = | |||||||||||
| 106 | 43 | grep { $$_[0] != $lambda } | |||||||||||
| 107 | 34 | @{ $SIGDATA{$id}-> {lambdas} }; | |||||||||||
| 108 | |||||||||||||
| 109 | 34 | ▶ | return if @{ $SIGDATA{$id}-> {lambdas} }; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 110 | |||||||||||||
| 111 | 28 | ▶ | warn "uninstall signal handler for $id\n" if $DEBUG > 1; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 112 | |||||||||||||
| 113 | 28 | ▶ | if (defined($SIGDATA{$id}-> {save})) { | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 114 | 0 | $SIG{$id} = $SIGDATA{$id}-> {save}; | |||||||||||
| 115 | } else { | ||||||||||||
| 116 | 28 | delete $SIG{$id}; | |||||||||||
| 117 | } | ||||||||||||
| 118 | 28 | delete $SIGDATA{$id}; | |||||||||||
| 119 | } | ||||||||||||
| 120 | |||||||||||||
| 121 | # create a lambda that either returns undef on timeout, | ||||||||||||
| 122 | # or some custom value based on passed callback | ||||||||||||
| 123 | sub signal_or_timeout_lambda | ||||||||||||
| 124 | { | ||||||||||||
| 125 | 34 | ▶ | my ( $id, $deadline, $condition) = @_; | ||||||||||
|
Subroutine
signal_or_timeout_lambda: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||||
| 126 | |||||||||||||
| 127 | 34 | my $t; | |||||||||||
| 128 | 34 | my $q = IO::Lambda-> new; | |||||||||||
| 129 | |||||||||||||
| 130 | # wait for signal | ||||||||||||
| 131 | 34 | my $c = $q-> bind; | |||||||||||
| 132 | watch_signal( $id, $q, sub { | ||||||||||||
| 133 | 16340 | ▶ | my @ret = $condition-> (); | ||||||||||
|
Subroutine
__ANON__: called CC=3 SCAR=11.0
| |||||||||||||
| 134 | 16340 | ▶ | return unless @ret; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 135 | |||||||||||||
| 136 | 32 | unwatch_signal( $id, $q); | |||||||||||
| 137 | 32 | ▶ | $q-> cancel_event($t) if $t; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 138 | 32 | $q-> resolve($c); | |||||||||||
| 139 | 32 | $q-> terminate(@ret); # result | |||||||||||
| 140 | 32 | undef $c; | |||||||||||
| 141 | 32 | undef $q; | |||||||||||
| 142 | 34 | }); | |||||||||||
| 143 | |||||||||||||
| 144 | # or wait for timeout | ||||||||||||
| 145 | $t = $q-> watch_timer( $deadline, sub { | ||||||||||||
| 146 | 1 | ▶ | unwatch_signal( $id, $q); | ||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||
| 147 | 1 | $q-> resolve($c); | |||||||||||
| 148 | 1 | undef $c; | |||||||||||
| 149 | 1 | undef $q; | |||||||||||
| 150 | 1 | return undef; #result | |||||||||||
| 151 | 34 | ▶ | }) if $deadline; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 152 | |||||||||||||
| 153 | 34 | return $q; | |||||||||||
| 154 | } | ||||||||||||
| 155 | |||||||||||||
| 156 | sub new_process; | ||||||||||||
| 157 | # condition | ||||||||||||
| 158 | 2 | ▶ | sub signal (&) { new_signal (context)-> condition(shift, \&signal, 'signal') } | ||||||||||
|
Subroutine
signal: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||
| 159 | 32 | ▶ | sub pid (&) { new_pid (context)-> condition(shift, \&pid, 'pid') } | ||||||||||
|
Subroutine
pid: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||
| 160 | 2 | ▶ | sub spawn (&) { new_process-> call(context)-> condition(shift, \&spawn, 'spawn') } | ||||||||||
|
Subroutine
spawn: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||
| 161 | |||||||||||||
| 162 | sub new_signal | ||||||||||||
| 163 | { | ||||||||||||
| 164 | 2 | ▶ | my ( $id, $deadline) = @_; | ||||||||||
|
Subroutine
new_signal: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||
| 165 | signal_or_timeout_lambda( $id, $deadline, | ||||||||||||
| 166 | 2 | ▶ | sub { 1 }); | ||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||
| 167 | } | ||||||||||||
| 168 | |||||||||||||
| 169 | sub new_pid | ||||||||||||
| 170 | { | ||||||||||||
| 171 | 32 | ▶ | my ( $pid, $deadline) = @_; | ||||||||||
|
Subroutine
new_pid: called CC=14 SCAR=36.5
Pod
undocumented
| |||||||||||||
| 172 | |||||||||||||
| 173 | 32 | ▶ | croak 'bad pid' unless $pid =~ /^\-?\d+$/; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 174 | 32 | ▶ | warn "new_pid($pid) ", _t($deadline), "\n" if $DEBUG; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 175 | |||||||||||||
| 176 | # avoid race conditions | ||||||||||||
| 177 | 32 | my ( $savesig, $early_sigchld); | |||||||||||
| 178 | 32 | ▶ | unless ( defined $SIGDATA{CHLD}) { | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 179 | 26 | ▶ | warn "new_pid: install early SIGCHLD detector\n" if $DEBUG > 1; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 180 | 26 | $savesig = $SIG{CHLD}; | |||||||||||
| 181 | 26 | $early_sigchld = 0; | |||||||||||
| 182 | $SIG{CHLD} = sub { | ||||||||||||
| 183 | 0 | ▶ | warn "new_pid: early SIGCHLD caught\n" if $DEBUG > 1; | ||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
| |||||||||||||
| 184 | 0 | $early_sigchld++ | |||||||||||
| 185 | 26 | }; | |||||||||||
| 186 | } | ||||||||||||
| 187 | |||||||||||||
| 188 | # finished already | ||||||||||||
| 189 | 32 | ▶ | if ( waitpid( $pid, WNOHANG) != 0) { | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 190 | 0 | ▶ | if ( defined $early_sigchld) { | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 191 | 0 | ▶ | if ( defined( $savesig)) { | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 192 | 0 | $SIG{CHLD} = $savesig; | |||||||||||
| 193 | } else { | ||||||||||||
| 194 | 0 | delete $SIG{CHLD}; | |||||||||||
| 195 | } | ||||||||||||
| 196 | } | ||||||||||||
| 197 | 0 | ▶ | warn "new_pid($pid): finished already with $?\n" if $DEBUG > 1; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 198 | 0 | return IO::Lambda-> new-> call($?) | |||||||||||
| 199 | } | ||||||||||||
| 200 | |||||||||||||
| 201 | # wait | ||||||||||||
| 202 | my $p = signal_or_timeout_lambda( 'CHLD', $deadline, sub { | ||||||||||||
| 203 | 16339 | ▶ | my $wp = waitpid($pid, WNOHANG); | ||||||||||
|
Subroutine
__ANON__: called CC=3 SCAR=11.0
| |||||||||||||
| 204 | 16339 | ▶ | warn "waitpid($pid) = $wp\n" if $DEBUG > 1; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 205 | 16339 | ▶ | return if $wp == 0; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 206 | 31 | return $?; | |||||||||||
| 207 | 32 | }); | |||||||||||
| 208 | |||||||||||||
| 209 | 32 | ▶ | warn "new_pid: new lambda(", _o($p), ")\n" if $DEBUG > 1; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 210 | |||||||||||||
| 211 | # don't let unwatch_signal() to restore it back to us | ||||||||||||
| 212 | 32 | ▶ | $SIGDATA{CHLD}-> {save} = $savesig if defined $early_sigchld; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 213 | |||||||||||||
| 214 | # possibly have a race? gracefully remove the lambda | ||||||||||||
| 215 | 32 | ▶ | if ( $early_sigchld) { | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 216 | |||||||||||||
| 217 | # Got a signal, but that wasn't our pid. And neither it was | ||||||||||||
| 218 | # pid that we're watching. | ||||||||||||
| 219 | 0 | ▶ | return $p if waitpid( $pid, WNOHANG) == 0; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 220 | |||||||||||||
| 221 | # Our pid is finished. Unwatch the signal. | ||||||||||||
| 222 | 0 | unwatch_signal( 'CHLD', $p); | |||||||||||
| 223 | # Lambda will also never get executed - cancel it | ||||||||||||
| 224 | 0 | $p-> terminate; | |||||||||||
| 225 | |||||||||||||
| 226 | 0 | ▶ | warn "new_pid($pid): finished with race: $?, ", _o($p), " killed\n" if $DEBUG > 1; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 227 | |||||||||||||
| 228 | 0 | return IO::Lambda-> new-> call($?); | |||||||||||
| 229 | } | ||||||||||||
| 230 | |||||||||||||
| 231 | 32 | return $p; | |||||||||||
| 232 | } | ||||||||||||
| 233 | |||||||||||||
| 234 | sub new_process_posix | ||||||||||||
| 235 | { | ||||||||||||
| 236 | lambda { | ||||||||||||
| 237 | 2 | ▶ | my $h = IO::Handle-> new; | ||||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=7.4
| |||||||||||||
| 238 | 2 | my $pid = open( $h, '-|', @_); | |||||||||||
| 239 | |||||||||||||
| 240 | 2 | ▶ | return undef, undef, $! unless $pid; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 241 | |||||||||||||
| 242 | 1 | this-> {pid} = $pid; | |||||||||||
| 243 | 1 | $h-> blocking(0); | |||||||||||
| 244 | |||||||||||||
| 245 | 1 | my $buf; | |||||||||||
| 246 | 1 | context readbuf, $h, \$buf, undef; # wait for EOF | |||||||||||
| 247 | tail { | ||||||||||||
| 248 | 1 | ▶ | my ($res, $error) = @_; | ||||||||||
|
Subroutine
__ANON__: called CC=3 SCAR=13.3
| |||||||||||||
| 249 | 1 | ▶ | if ( defined $error) { | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 250 | 0 | close $h; | |||||||||||
| 251 | 0 | return ($buf, $?, $error); | |||||||||||
| 252 | } | ||||||||||||
| 253 | |||||||||||||
| 254 | # finished already | ||||||||||||
| 255 | 1 | ▶ | if (waitpid($pid, WNOHANG) != 0) { | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 256 | 1 | my ( $exitcode, $error) = ( $?, $! ); | |||||||||||
| 257 | 1 | close $h; | |||||||||||
| 258 | 1 | return ($buf, $exitcode, $error); | |||||||||||
| 259 | } | ||||||||||||
| 260 | # wait for it | ||||||||||||
| 261 | 0 | context $pid; | |||||||||||
| 262 | pid { | ||||||||||||
| 263 | 0 | ▶ | close $h; | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||
| 264 | 0 | return ($buf, shift); | |||||||||||
| 265 | 1 | ▶ | }}}} | ||||||||||
|
Subroutine
new_process_posix: called CC=1 SCAR=0.4
Pod
undocumented
| |||||||||||||
| 266 | |||||||||||||
| 267 | sub new_process_win32 | ||||||||||||
| 268 | { | ||||||||||||
| 269 | lambda { | ||||||||||||
| 270 | 0 | ▶ | my @cmd = @_; | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||
| 271 | context IO::Lambda::Thread::threaded( sub { | ||||||||||||
| 272 | 0 | ▶ | my $k = `@cmd`; | ||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||||
| 273 | 0 | ▶ | return $? ? ( undef, $?, $! ) : ( $k, 0, undef ); | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 274 | 0 | }); | |||||||||||
| 275 | 0 | &tail(); | |||||||||||
| 276 | } | ||||||||||||
| 277 | 0 | ▶ | } | ||||||||||
|
Subroutine
new_process_win32: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||
| 278 | |||||||||||||
| 279 | |||||||||||||
| 280 | 12 | ▶ | if ( $^O !~ /win32/i) { | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 281 | 12 | *new_process = \&new_process_posix; | |||||||||||
| 282 | } else { | ||||||||||||
| 283 | 0 | require IO::Lambda::Thread; | |||||||||||
| 284 | 0 | ▶ | unless ( $IO::Lambda::Thread::DISABLED) { | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 285 | 0 | *new_process = \&new_process_win32; | |||||||||||
| 286 | } else { | ||||||||||||
| 287 | 0 | ▶ | *new_process = sub { lambda { undef, undef, $IO::Lambda::Thread::DISABLED } }; | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||
| 288 | } | ||||||||||||
| 289 | } | ||||||||||||
| 290 | |||||||||||||
| 291 | |||||||||||||
| 292 | 12 | 1; | |||||||||||
| 293 | |||||||||||||
| 294 | __DATA__ | ||||||||||||