Skip Menu |

This queue is for tickets about the Net-DNS CPAN distribution.

Report information
The Basics
Id: 107052
Status: rejected
Priority: 0/
Queue: Net-DNS

People
Owner: Nobody in particular
Requestors: kes-kes [...] yandex.ru
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: suppress messages: Can\'t locate Net/DNS/Resolver/linux.pm
main::__ANON__('Can\'t locate Net/DNS/Resolver/linux.pm in @INC (you may need to install the Net::DNS::Res olver::linux module) (@INC contains: /home/feelsafe/public_html/lib /home/feelsafe/perl5/lib/perl5/x86_64- linux-gnu-thread-multi /home/feelsafe/perl5/lib/perl5 /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.20. 2 /usr/local/share/perl/5.20.2 /usr/lib/x86_64-linux-gnu/perl5/5.20 /usr/share/perl5 /usr/lib/x86_64-linux -gnu/perl/5.20 /usr/share/perl/5.20 /usr/local/lib/site_perl .) at (eval 320) line 1.^J') called at (eval 320) line 1 eval 'require Net::DNS::Resolver::linux;' at /home/feelsafe/perl5/lib/perl5/Net/DNS/Resolver.pm line 23
From: kes-kes [...] yandex.ru
In your module you must do: eval { local $SIG{'__DIE__'}; require '...' }; Due to the current arguably broken state of __DIE__ hooks Which is described here: http://perldoc.perl.org/functions/eval.html I use Log::Log4perl and I get LOOOOOOONG spam with back trace in my log files
From: rwfranks [...] acm.org
On Sat Sep 12 06:37:50 2015, kes-kes@yandex.ru wrote: Show quoted text
> In your module you must do: > > eval { local $SIG{'__DIE__'}; require '...' }; > > Due to the current arguably broken state of __DIE__ hooks > > Which is described here: http://perldoc.perl.org/functions/eval.html > > I use Log::Log4perl and I get LOOOOOOONG spam with back trace in my > log files
Suppressing this at source by localising $SIG{__DIE__} is a good idea.
The fix has been released with 1.02
From: kes-kes [...] yandex.ru
Срд Окт 07 04:26:30 2015, NLNETLABS писал: Show quoted text
> The fix has been released with 1.02
They are not suppressed yet: main::__ANON__('Can\'t locate Net/DNS/Resolver/linux.pm in @INC (you may need to install the Net::DNS::Resolver::linux module) (@INC contains: /home/feelsafe/tmp/perl_libs/lib /home/feelsafe/public_html/lib /home/feelsafe/perl_lib/lib/perl5/x86_64-linux-thread-multi /home/feelsafe/perl_lib/lib/perl5 /home/feelsafe/perl_bin/lib/site_perl/5.22.1/x86_64-linux-thread-multi /home/feelsafe/perl_bin/lib/site_perl/5.22.1 /home/feelsafe/perl_bin/lib/5.22.1/x86_64-linux-thread-multi /home/feelsafe/perl_bin/lib/5.22.1 .) at (eval 439) line 2, <DATA> line 46.^J') called at (eval 439) line 2 eval 'require Net::DNS::Resolver::linux' at /home/feelsafe/public_html/lib/Net/DNS/Resolver.pm line 21 Net::DNS is up to date (1.04)
From: kes-kes [...] yandex.ru
main::__ANON__('Can\'t locate Net/LibIDN.pm in @INC (you may need to install the Net::LibIDN module) (@INC contains: /home/feelsafe/tmp/perl_libs/lib /home/feelsafe/public_html/lib /home/feelsafe/perl_lib/lib/perl5/x86_64-linux-thread-multi /home/feelsafe/perl_lib/lib/perl5 /home/feelsafe/perl_bin/lib/site_perl/5.22.1/x86_64-linux-thread-multi /home/feelsafe/perl_bin/lib/site_perl/5.22.1 /home/feelsafe/perl_bin/lib/5.22.1/x86_64-linux-thread-multi /home/feelsafe/perl_bin/lib/5.22.1 .) at /home/feelsafe/perl_lib/lib/perl5/Net/DNS/Domain.pm line 57, <DATA> line 46.^J') called at /home/feelsafe/perl_lib/lib/perl5/Net/DNS/Domain.pm line 57
From: kes-kes [...] yandex.ru
Suggested fix: Domain.pm:58 use constant LIBIDN => UTF8 && defined eval { local $SIG{__DIE__}; require Net::LibIDN; }; Resolver.pm:21 use constant CONFIG => scalar eval join ' ', 'local $SIG{__DIE__}; require', OS_CONF;
From: rwfranks [...] acm.org
On Tue Jan 19 05:12:35 2016, kes-kes@yandex.ru wrote: Show quoted text
> Suggested fix: > > Domain.pm:58 > use constant LIBIDN => UTF8 && defined eval { local $SIG{__DIE__}; > require Net::LibIDN; }; > > Resolver.pm:21 > use constant CONFIG => scalar eval join ' ', 'local $SIG{__DIE__}; > require', OS_CONF;
Why is it necessary to use a die handler at compile time? Please provide some useful context for this problem: 1) A short (<20 lines) script which demonstrates this problem. 2) Cite some real-world code (in CPAN or elsewhere) which misbehaves as a direct consequence of the claimed problem.
From: kes-kes [...] yandex.ru
That is not compile time, this evel time. I post the link earlier already: http://perldoc.perl.org/functions/eval.html Show quoted text
>Using the eval{} form as an exception trap in libraries does have some issues. Due to the current arguably broken state of __DIE__ hooks, you may wish not to trigger any __DIE__ hooks that user code may have installed. You can use the local $SIG{__DIE__} construct for this purpose, as this example shows:
# a private exception trap for divide-by-zero eval { local $SIG{'__DIE__'}; $answer = $a / $b; };
From: rwfranks [...] acm.org
On Wed Jan 20 01:19:11 2016, kes-kes@yandex.ru wrote: Show quoted text
> That is not compile time, this evel time. >
The evals are within [implicit] BEGIN block in "use". This test script shows what happens. sub BEGIN { print "\ncompilation starts\n"; } sub UNITCHECK { print "\ncompilation ends\n"; } print "run time\n"; BEGIN { $SIG{__DIE__} = sub { print "die handled: [@_]\n" } } use Net::DNS; exit; This produce the following: compilation starts die handled: [Can't locate Net/DNS/Resolver/linux.pm in @INC (you may need to install the Net::DNS::Resolver::linux module) (@INC contains: /home/rwf/perl5/lib/perl5/i386-linux-thread-multi /home/rwf/perl5/lib/perl5 /home/rwf/devel /home/rwf/devel/extra/lib /usr/local/lib/perl5 /usr/local/share/perl5 /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5 /usr/share/perl5 .) at (eval 11) line 2. ] compilation ends run time Show quoted text
> I post the link earlier already: > http://perldoc.perl.org/functions/eval.html >
On its own, that does not constitute evidence of a problem, but is useful advice if you actually have one. If you want me to change Net::DNS, I need to see some substantial evidence that there is a real problem. Unless you are prepared to divulge some solid reason for putting a die handler in a BEGIN block before the use directives, this story is going nowhere.
On 2016-01-20 01:19:11, kes-kes@yandex.ru wrote: Show quoted text
> That is not compile time, this evel time. > > I post the link earlier already: > http://perldoc.perl.org/functions/eval.html >
> > Using the eval{} form as an exception trap in libraries does have > > some issues. Due to the current arguably broken state of __DIE__ > > hooks, you may wish not to trigger any __DIE__ hooks that user code > > may have installed. You can use the local $SIG{__DIE__} construct for > > this purpose, as this example shows:
> > # a private exception trap for divide-by-zero > eval { local $SIG{'__DIE__'}; $answer = $a / $b; };
The Log::Log4perl FAQ suggests in its $SIG{__DIE__} examples the usage of return if $^S . Was this done here?
Unfortunately the suggested fix does not resolve the issue.