so I modified it to:Invalid version format (non-numeric data) at perlmonkII.pl line 7, nea +r "package SpyHash " syntax error at perlmonkII.pl line 9, near "package SpyHash {
Then I ran this code on perl v.12.5 and I gotuse 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); } 1; package main; 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
Assign to key CHLD at perlmonkII.pl line 34
In reply to Re^4: SIG{CHLD} altered by require statement on Perl 5.12.1
by sdingare
in thread SIG{CHLD} altered by require statement on Perl 5.12.1
by sdingare
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |