diff options
author | Michael G. Schwern <schwern@pobox.com> | 2010-09-13 19:10:18 -0700 |
---|---|---|
committer | Florian Ragwitz <rafl@debian.org> | 2010-09-15 18:59:41 +0200 |
commit | 140f53691aaf373827763070261a076e87563f46 (patch) | |
tree | f573e655f7c48bb6ee8d0d68d1de9bedf737e9d7 /t/test.pl | |
parent | 16d4bea688216f67ff66c9d38ff549a8ced03c2d (diff) | |
download | perl-140f53691aaf373827763070261a076e87563f46.tar.gz |
Shut up "used only once" warnings.
Not very elegant, but it avoids using $^W or warnings.pm.
Diffstat (limited to 't/test.pl')
-rw-r--r-- | t/test.pl | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -546,7 +546,8 @@ sub runperl { return $result; } -*run_perl = \&runperl; # Nice alias. +# Nice alias +*run_perl = *run_perl = \&runperl; # shut up "used only once" warning sub DIE { _print_stderr "# @_\n"; @@ -824,9 +825,12 @@ sub watchdog ($;$) goto WATCHDOG_VIA_ALARM; } + # shut up use only once warning + my $threads_on = $threads::threads && $threads::threads; + # Don't use a watchdog process if 'threads' is loaded - # use a watchdog thread instead - if (! $threads::threads) { + if (!$threads_on) { # On Windows and VMS, try launching a watchdog process # using system(1, ...) (see perlport.pod) |