in reply to Re^2: SIG{CHLD} altered by require statement on Perl 5.12.1
in thread SIG{CHLD} altered by require statement on Perl 5.12.1
Net::DNS 0.66 is really old, released before January 2012. I can't find the sources for Net::DNS 0.66 at CPAN. Consider upgrading it to the most recent version.
As you can see from the script output, Net::DNS loads a lot of other modules, perhaps $SIG{CHLD} is deleted in one of the other modules. The following script should report where $SIG{CHLD} is modified. Run it on perl 5.12.1.
#!/usr/bin/perl use v5.12; use strict; use warnings; package SpyHash { use Tie::Hash; # for Tie::StdHash use Carp qw( carp ); our @ISA=qw( Tie::StdHash ); sub STORE { my ($self,$key,$value)=@_; $key=~/^CH?LD$/ and carp "Assign to key $key"; return $self->SUPER::STORE($key,$value); } sub DELETE { my ($self,$key)=@_; $key=~/^CH?LD$/ and carp "Delete key $key"; return $self->SUPER::DELETE($key); } } tie %SIG,'SpyHash'; $SIG{'CHLD'}=sub { 'just a dummy' }; # this line should be reported require Net::DNS; # Any module messing with $SIG{'CHLD'} should be rep +orted from here Net::DNS->import(); # ... or here
Alexander
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: SIG{CHLD} altered by require statement on Perl 5.12.1
by sdingare (Initiate) on Apr 15, 2015 at 22:18 UTC | |
by afoken (Chancellor) on Apr 16, 2015 at 11:15 UTC | |
by sdingare (Initiate) on Apr 17, 2015 at 19:40 UTC | |
by sdingare (Initiate) on Apr 17, 2015 at 19:57 UTC | |
by afoken (Chancellor) on Apr 17, 2015 at 22:15 UTC | |
|