Control: forwarded -1 https://rt.cpan.org/Public/Bug/Display.html?id=96119

Axel Beckert wrote:
> I can reproduce it outside lintian with just
> 
> $ perl -w -e 'require Net::DNS'
> Too late to run INIT block at /usr/lib/x86_64-linux-gnu/perl5/5.20/Net/DNS.pm 
> line 209.

https://rt.cpan.org/Public/Bug/Display.html?id=96119 has some
background as Damyan pointed out. Actually there is also comment from
today, that the issue is back with 0.79 and Perl 5.20.


The relevant code part is:

########################################
#       Net::DNS::SEC 0.17 compatibility
########################################

use constant OLDDNSSEC => Net::DNS::RR->COMPATIBLE;

if (OLDDNSSEC) {
        require Net::DNS::RR::RRSIG;    ## pre-load RRs
        foreach my $type (qw(SIG DS DLV DNSKEY KEY NXT NSEC)) {
                new Net::DNS::RR( type => $type );
        }

        eval {
                #no warnings 'void';    ## DIY patch to suppress "Too late to 
run INIT block ..."

                sub INIT {              ## only needed to satisfy DNSSEC 
t/00-load.t
                        return unless OLDDNSSEC;

                        # attempt to pre-load RRs which have circular 
dependence problems
                        foreach my $type (qw(NSEC3 NSEC3PARAM)) {
                                new Net::DNS::RR( type => $type );
                        }
                }
        };
}


The Changes file says about this:

**** 0.77 Jun 13, 2014

[...]

Fix rt.cpan.org #96119

        "Too late to run INIT block" warning for require Net::DNS
 
[...]

Fix inefficient Net::DNS::SEC compatibility code


(Not sure if the last line is related.)

                Regards, Axel
-- 
 ,''`.  |  Axel Beckert <[email protected]>, http://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE
  `-    |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to