| 1 | package POE::Component::CPAN::YACSmoke; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | 12 | $POE::Component::CPAN::YACSmoke::VERSION = '1.38'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | #ABSTRACT: Bringing the power of POE to CPAN smoke testing. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5 | 12 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 6 | 12 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | 12 | ▶ | use POE qw(Wheel::Run); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | 12 | ▶ | use Storable; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 10 | 12 | my $GOT_KILLFAM; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | 12 | ▶ | BEGIN { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.2
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | 12 | $GOT_KILLFAM = 0; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | 12 | eval { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | 12 | require Proc::ProcessTable; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | 0 | $GOT_KILLFAM = 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | 11 | ▶ | sub spawn { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
spawn: called CC=7 SCAR=30.7
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | 11 | my $package = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | 11 | my %opts = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | 11 | $opts{lc $_} = delete $opts{$_} for keys %opts; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | 11 | my $options = delete $opts{options}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | 11 | ▶ | if ( $^O eq 'MSWin32' ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | 0 | eval { require Win32; }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | 0 | ▶ | if ($@) { die "Win32 but failed to load:\n$@" } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | 0 | eval { require Win32::Job; }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | 0 | ▶ | if ($@) { die "Win32::Job but failed to load:\n$@" } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | 0 | eval { require Win32::Process; }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 32 | 0 | ▶ | if ($@) { die "Win32::Process but failed to load:\n$@" } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 33 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 35 | 11 | my $self = bless \%opts, $package; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 36 | 11 | ▶ | $self->{session_id} = POE::Session->create( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 37 | object_states => [ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 38 | $self => { shutdown => '_shutdown', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 39 | submit => '_command', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 40 | push => '_command', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 41 | unshift => '_command', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 42 | recent => '_command', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 43 | check => '_command', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 44 | indices => '_command', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 45 | author => '_command', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 46 | flush => '_command', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 47 | 'package' => '_command', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 48 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 49 | $self => [ qw(_start _spawn_wheel _wheel_error _wheel_closed _wheel_stdout _wheel_stderr _wheel_idle _wheel_kill _sig_child _sig_handle) ], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 50 | ], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 51 | heap => $self, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 52 | ( ref($options) eq 'HASH' ? ( options => $options ) : () ), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 53 | )->ID(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 54 | 11 | return $self; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 55 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 56 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 57 | 0 | ▶ | sub session_id { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
session_id: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 58 | 0 | return $_[0]->{session_id}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 59 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 60 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 61 | 2 | ▶ | sub pending_jobs { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
pending_jobs: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 62 | 2 | return @{ $_[0]->{job_queue} }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 63 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 64 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 65 | 0 | ▶ | sub current_job { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
current_job: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 66 | 0 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 67 | 0 | ▶ | return unless $self->{_current_job}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 68 | 0 | my $item = Storable::dclone( $self->{_current_job} ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 69 | 0 | return $item; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 70 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 71 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 72 | 0 | ▶ | sub current_log { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
current_log: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 73 | 0 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 74 | 0 | ▶ | return unless $self->{_wheel_log}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 75 | 0 | my $item = Storable::dclone( $self->{_wheel_log} ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 76 | 0 | return $item; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 77 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 78 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 79 | 1 | ▶ | sub pause_queue { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
pause_queue: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 80 | 1 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 81 | 1 | $self->{paused} = 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 82 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 83 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 84 | 1 | ▶ | sub resume_queue { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
resume_queue: called CC=2 SCAR=7.1
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 85 | 1 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 86 | 1 | my $pause = delete $self->{paused}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 87 | 1 | ▶ | $poe_kernel->post( $self->{session_id}, '_spawn_wheel' ) if $pause; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 88 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 89 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 90 | 3 | ▶ | sub paused { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
paused: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 91 | 3 | return $_[0]->{paused}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 92 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 93 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 94 | 1 | ▶ | sub statistics { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
statistics: called CC=3 SCAR=11.7
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 95 | 1 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 96 | 1 | my @stats; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 97 | 1 | push @stats, $self->{stats}->{$_} for qw(started totaljobs avg_run min_run max_run); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 98 | 1 | ▶ | return @stats if wantarray; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 99 | 0 | return \@stats; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 100 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 102 | 0 | ▶ | sub shutdown { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
shutdown: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 103 | 0 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 104 | 0 | $poe_kernel->post( $self->{session_id}, 'shutdown' ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 105 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 106 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 107 | 11 | ▶ | sub _start { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_start: called CC=5 SCAR=16.8
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 108 | 11 | my ($kernel,$self) = @_[KERNEL,OBJECT]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 109 | 11 | $kernel->sig( 'HUP', '_sig_handle' ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 110 | 11 | $self->{session_id} = $_[SESSION]->ID(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 111 | 11 | ▶ | if ( $self->{alias} ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 112 | 11 | $kernel->alias_set( $self->{alias} ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 113 | } else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 114 | 0 | $kernel->refcount_increment( $self->{session_id} => __PACKAGE__ ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 115 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 116 | 11 | $self->{job_queue} = [ ]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 117 | 11 | ▶ | $self->{idle} = 600 unless $self->{idle}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 118 | 11 | ▶ | $self->{timeout} = 3600 unless $self->{timeout}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 119 | $self->{stats} = { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 120 | 11 | started => time(), | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 121 | totaljobs => 0, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 122 | avg_run => 0, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 123 | min_run => 0, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 124 | max_run => 0, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 125 | _sum => 0, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 126 | }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 127 | 11 | ▶ | $ENV{APPDATA} = $self->{appdata} if $self->{appdata}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 128 | 11 | undef; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 129 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 130 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 131 | 1 | ▶ | sub _sig_handle { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_sig_handle: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 132 | 1 | $poe_kernel->sig_handled(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 133 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 134 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 135 | 11 | ▶ | sub _shutdown { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_shutdown: called CC=4 SCAR=13.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 136 | 11 | my ($kernel,$self) = @_[KERNEL,OBJECT]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 137 | 11 | $kernel->sig( 'HUP' ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 138 | 11 | $kernel->sig( 'KILL' ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 139 | 11 | $kernel->alias_remove( $_ ) for $kernel->alias_list(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 140 | 11 | ▶ | $kernel->refcount_decrement( $self->{session_id} => __PACKAGE__ ) unless $self->{alias}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 141 | 11 | $kernel->refcount_decrement( $_->{session}, __PACKAGE__ ) for @{ $self->{job_queue} }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 142 | 11 | $self->{_shutdown} = 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 143 | 11 | undef; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 144 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 145 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 146 | 11 | ▶ | sub _command { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_command: called CC=65 SCAR=65.4
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 147 | 11 | my ($kernel,$self,$state,$sender) = @_[KERNEL,OBJECT,STATE,SENDER]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 148 | 11 | ▶ | return if $self->{_shutdown}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 149 | 11 | my $args; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 150 | 11 | ▶ | if ( ref( $_[ARG0] ) eq 'HASH' ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 151 | 11 | $args = { %{ $_[ARG0] } }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 152 | } else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 153 | 0 | $args = { @_[ARG0..$#_] }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 154 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 155 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 156 | 11 | ▶ | $state = 'push' if $state eq 'submit'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 157 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 158 | 11 | $args->{lc $_} = delete $args->{$_} for grep { $_ !~ /^_/ } keys %{ $args }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 159 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 160 | 11 | ▶ | my $ref = $kernel->alias_resolve( $args->{session} ) || $sender; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition33%1/3
$kernel->alias_resolve($args->{'session'}) || $sender
MC/DC0%0/2
$kernel->alias_resolve($args->{'session'}) || $sender
$kernel->alias_resolve($args->{'session'})
$sender
Truth table33%1/3
A || B
A= $kernel->alias_resolve($args->{'session'})B= $sender
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 161 | 11 | $args->{session} = $ref->ID(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 162 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 163 | 11 | ▶ | if ( !$args->{module} and $state !~ /^(recent|check|indices|package|author|flush)$/i ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
$args->{"module"} or $state =~ /^(recent|check|indices|package|author|flush)$/i
MC/DC0%0/2
$args->{"module"} or $state =~ /^(recent|check|indices|package|author|flush)$/i
$args->{"module"}
$state =~ /^(recent|check|indices|package|author|flush)$/i
Truth table66%2/3
A or B
A= $args->{"module"}B= $state =~ /^(recent|check|indices|package|author|flush)$/i
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 164 | 0 | warn "No 'module' specified for $state"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 165 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 166 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 167 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 168 | 11 | ▶ | unless ( $args->{event} ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 169 | 0 | warn "No 'event' specified for $state"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 170 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 171 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 172 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 173 | 11 | ▶ | if ( $state =~ /^(package|author)$/ and !$args->{search} ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
$state =~ /^(package|author)$/ and not $args->{"search"}
MC/DC0%0/2
$state =~ /^(package|author)$/ and not $args->{"search"}
$state =~ /^(package|author)$/
not $args->{"search"}
Truth table66%2/3
A and not(B)
A= $state =~ /^(package|author)$/B= not $args->{"search"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 174 | 0 | warn "No 'search' criteria specified for $state"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 175 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 176 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 177 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 178 | 11 | $args->{submitted} = time(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 179 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 180 | 11 | ▶ | if ( $state eq 'recent' ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 6 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 181 | 1 | ▶ | if ( $^O eq 'MSWin32' ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 182 | 0 | $args->{program} = \&_recent_modules; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 183 | 0 | ▶ | $args->{program_args} = [ $args->{perl} || $self->{perl} || $^X ]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/6
$args->{'perl'} || $self->{'perl'} || $^X
$args->{"perl"} or $self->{"perl"}
MC/DC0%0/3
$args->{'perl'} || $self->{'perl'} || $^X
$args->{"perl"}
$self->{"perl"}
$^X
Truth table0%0/4
A or B || C
A= $args->{"perl"}B= $self->{"perl"}C= $^X
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 184 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 185 | else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 186 | 1 | ▶ | my $perl = $args->{perl} || $self->{perl} || $^X; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition33%2/6
$args->{'perl'} || $self->{'perl'} || $^X
$args->{"perl"} or $self->{"perl"}
MC/DC0%0/3
$args->{'perl'} || $self->{'perl'} || $^X
$args->{"perl"}
$self->{"perl"}
$^X
Truth table25%1/4
A or B || C
A= $args->{"perl"}B= $self->{"perl"}C= $^X
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 187 | 1 | my $code = 'my $smoke = CPAN::YACSmoke->new(); print "$_\n" for $smoke->{plugin}->download_list();'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 188 | 1 | $args->{program} = [ $perl, '-MCPAN::YACSmoke', '-e', $code ]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 189 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 190 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 191 | elsif ( $state eq 'check' ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 192 | 1 | ▶ | if ( $^O eq 'MSWin32' ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 193 | 0 | $args->{program} = \&_check_yacsmoke; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 194 | 0 | ▶ | $args->{program_args} = [ $args->{perl} || $self->{perl} || $^X ]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/6
$args->{'perl'} || $self->{'perl'} || $^X
$args->{"perl"} or $self->{"perl"}
MC/DC0%0/3
$args->{'perl'} || $self->{'perl'} || $^X
$args->{"perl"}
$self->{"perl"}
$^X
Truth table0%0/4
A or B || C
A= $args->{"perl"}B= $self->{"perl"}C= $^X
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 195 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 196 | else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 197 | 1 | ▶ | my $perl = $args->{perl} || $self->{perl} || $^X; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition33%2/6
$args->{'perl'} || $self->{'perl'} || $^X
$args->{"perl"} or $self->{"perl"}
MC/DC0%0/3
$args->{'perl'} || $self->{'perl'} || $^X
$args->{"perl"}
$self->{"perl"}
$^X
Truth table25%1/4
A or B || C
A= $args->{"perl"}B= $self->{"perl"}C= $^X
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 198 | 1 | $args->{program} = [ $perl, '-MCPAN::YACSmoke', '-e', 1 ]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 199 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 200 | 1 | $args->{debug} = 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 201 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 202 | elsif ( $state eq 'indices' ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 203 | 1 | ▶ | $args->{prioritise} = 0 unless $args->{prioritise}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 204 | 1 | ▶ | if ( $^O eq 'MSWin32' ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 205 | 0 | $args->{program} = \&_reload_indices; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 206 | 0 | ▶ | $args->{program_args} = [ $args->{perl} || $self->{perl} || $^X ]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/6
$args->{'perl'} || $self->{'perl'} || $^X
$args->{"perl"} or $self->{"perl"}
MC/DC0%0/3
$args->{'perl'} || $self->{'perl'} || $^X
$args->{"perl"}
$self->{"perl"}
$^X
Truth table0%0/4
A or B || C
A= $args->{"perl"}B= $self->{"perl"}C= $^X
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 207 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 208 | else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 209 | 1 | ▶ | my $perl = $args->{perl} || $self->{perl} || $^X; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition33%2/6
$args->{'perl'} || $self->{'perl'} || $^X
$args->{"perl"} or $self->{"perl"}
MC/DC0%0/3
$args->{'perl'} || $self->{'perl'} || $^X
$args->{"perl"}
$self->{"perl"}
$^X
Truth table25%1/4
A or B || C
A= $args->{"perl"}B= $self->{"perl"}C= $^X
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 210 | 1 | my $code = 'CPANPLUS::Backend->new()->reload_indices( update_source => 1 );'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 211 | 1 | $args->{program} = [ $perl, '-MCPANPLUS::Backend', '-e', $code ]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 212 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 213 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 214 | elsif ( $state eq 'author' ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 215 | 1 | ▶ | if ( $^O eq 'MSWin32' ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 216 | 0 | $args->{program} = \&_author_search; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 217 | 0 | ▶ | $args->{program_args} = [ $args->{perl} || $self->{perl} || $^X, $args->{type} || 'cpanid', $args->{search} ]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/8
$args->{'perl'} || $self->{'perl'} || $^X
$args->{"perl"} or $self->{"perl"}
$args->{'type'} || 'cpanid'
MC/DC0%0/3
$args->{'perl'} || $self->{'perl'} || $^X
$args->{"perl"}
$self->{"perl"}
$^X
MC/DC0%0/1
$args->{'type'} || 'cpanid'
$args->{'type'}
Truth table0%0/4
A or B || C
A= $args->{"perl"}B= $self->{"perl"}C= $^X
Truth table0%0/2
A
A= $args->{'type'}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 218 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 219 | else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 220 | 1 | ▶ | my $perl = $args->{perl} || $self->{perl} || $^X; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition33%2/6
$args->{'perl'} || $self->{'perl'} || $^X
$args->{"perl"} or $self->{"perl"}
MC/DC0%0/3
$args->{'perl'} || $self->{'perl'} || $^X
$args->{"perl"}
$self->{"perl"}
$^X
Truth table25%1/4
A or B || C
A= $args->{"perl"}B= $self->{"perl"}C= $^X
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 221 | 1 | my $code = 'my $type = shift; my $search = shift; my $cb = CPANPLUS::Backend->new(); my %mods = map { $_->package() => 1 } map { $_->modules() } $cb->search( type => $type, allow => [ qr/$search/ ], [ verbose => 0 ] ); print qq{$_\n} for sort keys %mods;'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 222 | 1 | ▶ | $args->{program} = [ $perl, '-MCPANPLUS::Backend', '-e', $code, $args->{type} || 'cpanid', $args->{search} ]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition50%1/2
$args->{'type'} || 'cpanid'
MC/DC0%0/1
$args->{'type'} || 'cpanid'
$args->{'type'}
Truth table50%1/2
A
A= $args->{'type'}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 223 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 224 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 225 | elsif ( $state eq 'package' ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 226 | 1 | ▶ | if ( $^O eq 'MSWin32' ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 227 | 0 | $args->{program} = \&_package_search; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 228 | 0 | ▶ | $args->{program_args} = [ $args->{perl} || $self->{perl} || $^X, $args->{type} || 'package', $args->{search} ]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/8
$args->{'perl'} || $self->{'perl'} || $^X
$args->{"perl"} or $self->{"perl"}
$args->{'type'} || 'package'
MC/DC0%0/3
$args->{'perl'} || $self->{'perl'} || $^X
$args->{"perl"}
$self->{"perl"}
$^X
MC/DC0%0/1
$args->{'type'} || 'package'
$args->{'type'}
Truth table0%0/4
A or B || C
A= $args->{"perl"}B= $self->{"perl"}C= $^X
Truth table0%0/2
A
A= $args->{'type'}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 229 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 230 | else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 231 | 1 | ▶ | my $perl = $args->{perl} || $self->{perl} || $^X; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition33%2/6
$args->{'perl'} || $self->{'perl'} || $^X
$args->{"perl"} or $self->{"perl"}
MC/DC0%0/3
$args->{'perl'} || $self->{'perl'} || $^X
$args->{"perl"}
$self->{"perl"}
$^X
Truth table25%1/4
A or B || C
A= $args->{"perl"}B= $self->{"perl"}C= $^X
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 232 | 1 | my $code = 'my $type = shift; my $search = shift; my $cb = CPANPLUS::Backend->new(); my %mods = map { $_->package() => 1 } $cb->search( type => $type, allow => [ qr/$search/ ], [ verbose => 0 ] ); print qq{$_\n} for sort keys %mods;'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 233 | 1 | ▶ | $args->{program} = [ $perl, '-MCPANPLUS::Backend', '-e', $code, $args->{type} || 'package', $args->{search} ]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition50%1/2
$args->{'type'} || 'package'
MC/DC0%0/1
$args->{'type'} || 'package'
$args->{'type'}
Truth table50%1/2
A
A= $args->{'type'}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 234 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 235 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 236 | elsif ( $state eq 'flush' ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 237 | 1 | ▶ | $args->{prioritise} = 0 unless $args->{prioritise}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 238 | 1 | ▶ | if ( $^O eq 'MSWin32' ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 239 | 0 | $args->{program} = \&_flush; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 240 | 0 | ▶ | $args->{program_args} = [ $args->{perl} || $self->{perl} || $^X, ( $args->{type} and $args->{type} eq 'all' ? 'all' : 'old' ) ]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/9
$args->{'perl'} || $self->{'perl'} || $^X
$args->{"perl"} or $self->{"perl"}
$args->{'type'} && ($args->{'type'} eq 'all' ? 'all' : 'old')
MC/DC0%0/3
$args->{'perl'} || $self->{'perl'} || $^X
$args->{"perl"}
$self->{"perl"}
$^X
MC/DC0%0/2
$args->{'type'} && ($args->{'type'} eq 'all' ? 'all' : 'old')
$args->{'type'}
($args->{'type'} eq 'all' ? 'all' : 'old')
Truth table0%0/4
A or B || C
A= $args->{"perl"}B= $self->{"perl"}C= $^X
Truth table0%0/3
A && B
A= $args->{'type'}B= ($args->{'type'} eq 'all' ? 'all' : 'old')
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 241 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 242 | else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 243 | 1 | ▶ | my $perl = $args->{perl} || $self->{perl} || $^X; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition33%2/6
$args->{'perl'} || $self->{'perl'} || $^X
$args->{"perl"} or $self->{"perl"}
MC/DC0%0/3
$args->{'perl'} || $self->{'perl'} || $^X
$args->{"perl"}
$self->{"perl"}
$^X
Truth table25%1/4
A or B || C
A= $args->{"perl"}B= $self->{"perl"}C= $^X
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 244 | 1 | my $code = 'my $type = shift; my $smoke = CPAN::YACSmoke->new(); $smoke->flush($type) if $smoke->can("flush");'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 245 | 1 | ▶ | $args->{program} = [ $perl, '-MCPAN::YACSmoke', '-e', $code, ( $args->{type} and $args->{type} eq 'all' ? 'all' : 'old' ) ]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$args->{'type'} && ($args->{'type'} eq 'all' ? 'all' : 'old')
MC/DC0%0/2
$args->{'type'} && ($args->{'type'} eq 'all' ? 'all' : 'old')
$args->{'type'}
($args->{'type'} eq 'all' ? 'all' : 'old')
Truth table33%1/3
A && B
A= $args->{'type'}B= ($args->{'type'} eq 'all' ? 'all' : 'old')
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 246 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 247 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 248 | else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 249 | 5 | ▶ | if ( $^O eq 'MSWin32' ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 250 | 0 | $args->{program} = \&_test_module; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 251 | 0 | ▶ | $args->{program_args} = [ $args->{perl} || $self->{perl} || $^X, $args->{module} ]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/6
$args->{'perl'} || $self->{'perl'} || $^X
$args->{"perl"} or $self->{"perl"}
MC/DC0%0/3
$args->{'perl'} || $self->{'perl'} || $^X
$args->{"perl"}
$self->{"perl"}
$^X
Truth table0%0/4
A or B || C
A= $args->{"perl"}B= $self->{"perl"}C= $^X
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 252 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 253 | else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 254 | 5 | ▶ | my $perl = $args->{perl} || $self->{perl} || $^X; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition33%2/6
$args->{'perl'} || $self->{'perl'} || $^X
$args->{"perl"} or $self->{"perl"}
MC/DC0%0/3
$args->{'perl'} || $self->{'perl'} || $^X
$args->{"perl"}
$self->{"perl"}
$^X
Truth table25%1/4
A or B || C
A= $args->{"perl"}B= $self->{"perl"}C= $^X
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 255 | 5 | my $code = 'my $module = shift; my $smoke = CPAN::YACSmoke->new(); $smoke->test($module);'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 256 | 5 | $args->{program} = [ $perl, '-MCPAN::YACSmoke', '-e', $code, $args->{module} ]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 257 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 258 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 259 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 260 | 11 | $kernel->refcount_increment( $args->{session}, __PACKAGE__ ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 261 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 262 | 11 | $args->{cmd} = $state; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 263 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 264 | 11 | ▶ | if ( $state eq 'unshift' or $state eq 'recent' or $args->{prioritise} ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%4/6
$state eq "unshift" or $state eq "recent" or $args->{"prioritise"}
$state eq "unshift" or $state eq "recent"
MC/DC33%1/3
$state eq "unshift" or $state eq "recent" or $args->{"prioritise"}
$state eq "unshift"
$state eq "recent"
$args->{"prioritise"}
Truth table50%2/4
A or B or C
A= $state eq "unshift"B= $state eq "recent"C= $args->{"prioritise"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 265 | 1 | unshift @{ $self->{job_queue} }, $args; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 266 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 267 | else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 268 | 10 | push @{ $self->{job_queue} }, $args; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 269 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 270 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 271 | 11 | $kernel->yield( '_spawn_wheel' ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 272 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 273 | 11 | undef; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 274 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 275 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 276 | 11 | ▶ | sub _sig_child { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_sig_child: called CC=10 SCAR=23.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 277 | 11 | my ($kernel,$self,$thing,$pid,$status) = @_[KERNEL,OBJECT,ARG0..ARG2]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 278 | 11 | push @{ $self->{_wheel_log} }, "$thing $pid $status"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 279 | 11 | ▶ | warn "$thing $pid $status\n" if $self->{debug}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 280 | 11 | $kernel->delay( '_wheel_idle' ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 281 | 11 | my $job = delete $self->{_current_job}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 282 | 11 | $job->{status} = $status; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 283 | 11 | my $log = delete $self->{_wheel_log}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 284 | 11 | ▶ | if ( $job->{cmd} eq 'recent' ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 285 | 1 | pop @{ $log }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 286 | 1 | s/\x0D$// for @{ $log }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 287 | 1 | $job->{recent} = $log; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 288 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 289 | elsif ( $job->{cmd} =~ /^(package|author)$/ ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 290 | 2 | pop @{ $log }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 291 | 2 | s/\x0D$// for @{ $log }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 292 | 2 | @{ $job->{results} } = grep { $_ !~ /^\[/ } @{ $log }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 293 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 294 | else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 295 | 8 | $job->{log} = $log; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 296 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 297 | 11 | $job->{end_time} = time(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 298 | 11 | ▶ | unless ( $self->{debug} ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 299 | 6 | delete $job->{program}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 300 | 6 | delete $job->{program_args}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 301 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 302 | # Stats | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 303 | 11 | my $run_time = $job->{end_time} - $job->{start_time}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 304 | 11 | ▶ | $self->{stats}->{max_run} = $run_time if $run_time > $self->{stats}->{max_run}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 305 | 11 | ▶ | $self->{stats}->{min_run} = $run_time if $self->{stats}->{min_run} == 0; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 306 | 11 | ▶ | $self->{stats}->{min_run} = $run_time if $run_time < $self->{stats}->{min_run}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 307 | 11 | $self->{stats}->{_sum} += $run_time; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 308 | 11 | $self->{stats}->{totaljobs}++; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 309 | 11 | $self->{stats}->{avg_run} = $self->{stats}->{_sum} / $self->{stats}->{totaljobs}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 310 | 11 | $self->{debug} = delete $job->{global_debug}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 311 | #$ENV{APPDATA} = delete $job->{backup_env} if $job->{appdata}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 312 | 11 | $kernel->post( $job->{session}, $job->{event}, $job ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 313 | 11 | $kernel->refcount_decrement( $job->{session}, __PACKAGE__ ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 314 | 11 | $kernel->yield( '_spawn_wheel' ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 315 | 11 | $kernel->sig_handled(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 316 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 317 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 318 | 23 | ▶ | sub _spawn_wheel { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_spawn_wheel: called CC=11 SCAR=26.3
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 319 | 23 | my ($kernel,$self) = @_[KERNEL,OBJECT]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 320 | 23 | ▶ | return if $self->{wheel}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 321 | 23 | ▶ | return if $self->{_shutdown}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 322 | 23 | ▶ | return if $self->{paused}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 323 | 22 | my $job = shift @{ $self->{job_queue} }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 324 | 22 | ▶ | return unless $job; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 325 | 11 | my $backup_env; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 326 | 11 | ▶ | if ( $job->{appdata} ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 327 | 0 | $backup_env = $ENV{APPDATA}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 328 | 0 | $ENV{APPDATA} = $job->{appdata}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 329 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 330 | $self->{wheel} = POE::Wheel::Run->new( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 331 | Program => $job->{program}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 332 | ProgramArgs => $job->{program_args}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 333 | 11 | StdoutEvent => '_wheel_stdout', | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 334 | StderrEvent => '_wheel_stderr', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 335 | ErrorEvent => '_wheel_error', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 336 | CloseEvent => '_wheel_close', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 337 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 338 | 11 | ▶ | if ( $job->{appdata} ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 339 | 0 | delete $ENV{APPDATA}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 340 | 0 | ▶ | $ENV{APPDATA} = $backup_env if $backup_env; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 341 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 342 | 11 | ▶ | unless ( $self->{wheel} ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 343 | 0 | warn "Couldn\'t spawn a wheel for $job->{module}\n"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 344 | 0 | $kernel->refcount_decrement( $job->{session}, __PACKAGE__ ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 345 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 346 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 347 | 11 | ▶ | if ( defined $job->{debug} ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 348 | 5 | $job->{global_debug} = delete $self->{debug}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 349 | 5 | $self->{debug} = $job->{debug}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 350 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 351 | 11 | $self->{_wheel_log} = [ ]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 352 | 11 | $self->{_current_job} = $job; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 353 | 11 | $job->{PID} = $self->{wheel}->PID(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 354 | 11 | $job->{start_time} = time(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 355 | 11 | $kernel->sig_child( $job->{PID}, '_sig_child' ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 356 | 11 | ▶ | $kernel->delay( '_wheel_idle', 60 ) unless $job->{cmd} eq 'indices'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 357 | 11 | undef; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 358 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 359 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 360 | 11 | ▶ | sub _wheel_error { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_wheel_error: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 361 | 11 | $poe_kernel->delay( '_wheel_idle' ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 362 | 11 | delete $_[OBJECT]->{wheel}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 363 | 11 | undef; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 364 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 365 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 366 | 0 | ▶ | sub _wheel_closed { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_wheel_closed: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 367 | 0 | $poe_kernel->delay( '_wheel_idle' ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 368 | 0 | delete $_[OBJECT]->{wheel}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 369 | 0 | undef; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 370 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 371 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 372 | 0 | ▶ | sub _wheel_stdout { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_wheel_stdout: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 373 | 0 | my ($self, $input, $wheel_id) = @_[OBJECT, ARG0, ARG1]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 374 | 0 | $self->{_wheel_time} = time(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 375 | 0 | push @{ $self->{_wheel_log} }, $input; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 376 | 0 | ▶ | warn $input, "\n" if $self->{debug}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 377 | 0 | undef; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 378 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 379 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 380 | 10 | ▶ | sub _wheel_stderr { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_wheel_stderr: called CC=7 SCAR=23.6
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 381 | 10 | my ($self, $input, $wheel_id) = @_[OBJECT, ARG0, ARG1]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 382 | 10 | $self->{_wheel_time} = time(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 383 | 10 | ▶ | if ( $^O eq 'MSWin32' and !$self->{_current_job}->{GRP_PID} and my ($pid) = $input =~ /(\d+)/ ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%2/6
$^O eq "MSWin32" and not $self->{"_current_job"}{"GRP_PID"} and my($pid) = $input =~ /(\d+)/
$^O eq "MSWin32" and not $self->{"_current_job"}{"GRP_PID"}
MC/DC0%0/3
$^O eq "MSWin32" and not $self->{"_current_job"}{"GRP_PID"} and my($pid) = $input =~ /(\d+)/
$^O eq "MSWin32"
not $self->{"_current_job"}{"GRP_PID"}
my($pid) = $input =~ /(\d+)/
Truth table25%1/4
A and not(B) and C
A= $^O eq "MSWin32"B= not $self->{"_current_job"}{"GRP_PID"}C= my($pid) = $input =~ /(\d+)/
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 384 | 0 | $self->{_current_job}->{GRP_PID} = $pid; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 385 | 0 | ▶ | warn "Grp PID: $pid\n" if $self->{debug}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 386 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 387 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 388 | 10 | ▶ | push @{ $self->{_wheel_log} }, $input unless $self->{_current_job}->{cmd} eq 'recent'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 389 | 10 | ▶ | warn $input, "\n" if $self->{debug}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 390 | 10 | undef; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 391 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 392 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 393 | 0 | ▶ | sub _wheel_idle { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_wheel_idle: not called CC=3 SCAR=24.8
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 394 | 0 | my ($kernel,$self) = @_[KERNEL,OBJECT]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 395 | 0 | my $now = time(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 396 | 0 | ▶ | if ( $now - $self->{_wheel_time} >= $self->{idle} ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 397 | 0 | $self->{_current_job}->{idle_kill} = 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 398 | 0 | $kernel->yield( '_wheel_kill', 'Killing current run due to excessive idle' ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 399 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 400 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 401 | 0 | ▶ | if ( $now - $self->{_current_job}->{start_time} >= $self->{timeout} ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 402 | 0 | $self->{_current_job}->{excess_kill} = 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 403 | 0 | $kernel->yield( '_wheel_kill', 'Killing current run due to excessive run-time' ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 404 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 405 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 406 | 0 | $kernel->delay( '_wheel_idle', 60 ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 407 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 408 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 409 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 410 | 0 | ▶ | sub _wheel_kill { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_wheel_kill: not called CC=11 SCAR=48.8
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 411 | 0 | my ($kernel,$self,$reason) = @_[KERNEL,OBJECT,ARG0]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 412 | 0 | push @{ $self->{_wheel_log} }, $reason; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 413 | 0 | ▶ | warn $reason, "\n" if $self->{debug}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 414 | 0 | ▶ | if ( $^O eq 'MSWin32' and $self->{wheel} ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$^O eq "MSWin32" and $self->{"wheel"}
MC/DC0%0/2
$^O eq "MSWin32" and $self->{"wheel"}
$^O eq "MSWin32"
$self->{"wheel"}
Truth table0%0/3
A and B
A= $^O eq "MSWin32"B= $self->{"wheel"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 415 | 0 | my $grp_pid = $self->{_current_job}->{GRP_PID}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 416 | 0 | ▶ | return unless $grp_pid; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 417 | 0 | ▶ | warn Win32::FormatMessage( Win32::GetLastError() ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 418 | unless Win32::Process::KillProcess( $grp_pid, 0 ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 419 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 420 | else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 421 | 0 | ▶ | if ( !$self->{no_grp_kill} ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 422 | 0 | ▶ | $self->{wheel}->kill(-9) if $self->{wheel}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 423 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 424 | elsif ( $GOT_KILLFAM ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 425 | 0 | ▶ | _kill_family( 9, $self->{wheel}->PID() ) if $self->{wheel}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 426 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 427 | else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 428 | 0 | ▶ | $self->{wheel}->kill(9) if $self->{wheel}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 429 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 430 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 431 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 432 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 433 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 434 | 0 | ▶ | sub _check_yacsmoke { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_check_yacsmoke: not called CC=3 SCAR=24.8
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 435 | 0 | my $perl = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 436 | 0 | my $cmdline = $perl . q{ -MCPAN::YACSmoke -e 1}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 437 | 0 | ▶ | my $job = Win32::Job->new() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 438 | or die Win32::FormatMessage( Win32::GetLastError() ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 439 | 0 | ▶ | my $pid = $job->spawn( $perl, $cmdline ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 440 | or die Win32::FormatMessage( Win32::GetLastError() ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 441 | 0 | warn $pid, "\n"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 442 | 0 | ▶ | my $ok = $job->watch( sub { 0 }, 60 ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 443 | 0 | my $hashref = $job->status(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 444 | 0 | return $hashref->{$pid}->{exitcode}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 445 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 446 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 447 | 0 | ▶ | sub _test_module { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_test_module: not called CC=3 SCAR=24.8
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 448 | 0 | my $perl = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 449 | 0 | my $module = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 450 | 0 | my $cmdline = $perl . ' -MCPAN::YACSmoke -e "my $module = shift; my $smoke = CPAN::YACSmoke->new(); $smoke->test($module);" ' . $module; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 451 | 0 | ▶ | my $job = Win32::Job->new() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 452 | or die Win32::FormatMessage( Win32::GetLastError() ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 453 | 0 | ▶ | my $pid = $job->spawn( $perl, $cmdline ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 454 | or die Win32::FormatMessage( Win32::GetLastError() ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 455 | 0 | warn $pid, "\n"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 456 | 0 | ▶ | my $ok = $job->watch( sub { 0 }, 60 ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 457 | 0 | my $hashref = $job->status(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 458 | 0 | return $hashref->{$pid}->{exitcode}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 459 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 460 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 461 | 0 | ▶ | sub _flush { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_flush: not called CC=3 SCAR=24.8
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 462 | 0 | my $perl = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 463 | 0 | my $type = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 464 | 0 | my $cmdline = $perl . ' -MCPAN::YACSmoke -e "my $type = shift; my $smoke = CPAN::YACSmoke->new(); $smoke->flush($type) if $smoke->can(q{flush});" ' . $type; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 465 | 0 | ▶ | my $job = Win32::Job->new() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 466 | or die Win32::FormatMessage( Win32::GetLastError() ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 467 | 0 | ▶ | my $pid = $job->spawn( $perl, $cmdline ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 468 | or die Win32::FormatMessage( Win32::GetLastError() ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 469 | 0 | warn $pid, "\n"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 470 | 0 | ▶ | my $ok = $job->watch( sub { 0 }, 60 ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 471 | 0 | my $hashref = $job->status(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 472 | 0 | return $hashref->{$pid}->{exitcode}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 473 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 474 | 0 | ▶ | sub _recent_modules { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_recent_modules: not called CC=3 SCAR=24.8
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 475 | 0 | my $perl = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 476 | 0 | my $cmdline = $perl . ' -MCPAN::YACSmoke -e "my $smoke = CPAN::YACSmoke->new();print qq{$_\n} for $smoke->{plugin}->download_list();"'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 477 | 0 | ▶ | my $job = Win32::Job->new() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 478 | or die Win32::FormatMessage( Win32::GetLastError() ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 479 | 0 | ▶ | my $pid = $job->spawn( $perl, $cmdline ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 480 | or die Win32::FormatMessage( Win32::GetLastError() ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 481 | 0 | warn $pid, "\n"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 482 | 0 | ▶ | my $ok = $job->watch( sub { 0 }, 60 ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 483 | 0 | my $hashref = $job->status(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 484 | 0 | return $hashref->{$pid}->{exitcode}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 485 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 486 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 487 | 0 | ▶ | sub _reload_indices { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_reload_indices: not called CC=3 SCAR=24.8
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 488 | 0 | my $perl = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 489 | 0 | my $cmdline = $perl . ' -MCPANPLUS::Backend -e "CPANPLUS::Backend->new()->reload_indices( update_source => 1 );"'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 490 | 0 | ▶ | my $job = Win32::Job->new() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 491 | or die Win32::FormatMessage( Win32::GetLastError() ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 492 | 0 | ▶ | my $pid = $job->spawn( $perl, $cmdline ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 493 | or die Win32::FormatMessage( Win32::GetLastError() ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 494 | 0 | warn $pid, "\n"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 495 | 0 | ▶ | my $ok = $job->watch( sub { 0 }, 60 ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 496 | 0 | my $hashref = $job->status(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 497 | 0 | return $hashref->{$pid}->{exitcode}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 498 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 499 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 500 | 0 | ▶ | sub _author_search { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_author_search: not called CC=3 SCAR=24.8
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 501 | 0 | my $perl = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 502 | 0 | my $type = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 503 | 0 | my $search = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 504 | 0 | my $cmdline = $perl . ' -MCPAN::YACSmoke -e "my $type = shift; my $search = shift; my $cb = CPANPLUS::Backend->new(); my %mods = map { $_->package() => 1 } map { $_->modules() } $cb->search( type => $type, allow => [ qr/$search/ ], [ verbose => 0 ] ); print qq{$_\n} for sort keys %mods;" ' . $type . " " . $search; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 505 | 0 | ▶ | my $job = Win32::Job->new() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 506 | or die Win32::FormatMessage( Win32::GetLastError() ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 507 | 0 | ▶ | my $pid = $job->spawn( $perl, $cmdline ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 508 | or die Win32::FormatMessage( Win32::GetLastError() ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 509 | 0 | warn $pid, "\n"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 510 | 0 | ▶ | my $ok = $job->watch( sub { 0 }, 60 ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 511 | 0 | my $hashref = $job->status(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 512 | 0 | return $hashref->{$pid}->{exitcode}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 513 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 514 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 515 | 0 | ▶ | sub _package_search { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_package_search: not called CC=3 SCAR=24.8
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 516 | 0 | my $perl = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 517 | 0 | my $type = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 518 | 0 | my $search = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 519 | 0 | my $cmdline = $perl . ' -MCPAN::YACSmoke -e "my $type = shift; my $search = shift; my $cb = CPANPLUS::Backend->new(); my %mods = map { $_->package() => 1 } $cb->search( type => $type, allow => [ qr/$search/ ], [ verbose => 0 ] ); print qq{$_\n} for sort keys %mods;" ' . $type . " " . $search; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 520 | 0 | ▶ | my $job = Win32::Job->new() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 521 | or die Win32::FormatMessage( Win32::GetLastError() ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 522 | 0 | ▶ | my $pid = $job->spawn( $perl, $cmdline ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 523 | or die Win32::FormatMessage( Win32::GetLastError() ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 524 | 0 | warn $pid, "\n"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 525 | 0 | ▶ | my $ok = $job->watch( sub { 0 }, 60 ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 526 | 0 | my $hashref = $job->status(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 527 | 0 | return $hashref->{$pid}->{exitcode}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 528 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 529 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 530 | 0 | ▶ | sub _kill_family { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_kill_family: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 531 | 0 | my ($signal, @pids) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 532 | 0 | my $pt = Proc::ProcessTable->new; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 533 | 0 | my (@procs) = @{$pt->table}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 534 | 0 | my (@kids) = _get_pids( \@procs, @pids ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 535 | 0 | @pids = (@pids, @kids); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 536 | 0 | kill $signal, reverse @pids; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 537 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 538 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 539 | 0 | ▶ | sub _get_pids { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_get_pids: not called CC=4 SCAR=30.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 540 | 0 | my($procs, @kids) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 541 | 0 | my @pids; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 542 | 0 | foreach my $kid (@kids) { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 543 | 0 | foreach my $proc (@$procs) { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 544 | 0 | ▶ | if ($proc->ppid == $kid) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 545 | 0 | my $pid = $proc->pid; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 546 | 0 | push @pids, $pid, _get_pids( $procs, $pid ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 547 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 548 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 549 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 550 | 0 | @pids; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 551 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 552 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 553 | 12 | 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 554 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 555 | __END__ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||