Subject: | Unitialized variable warnings in RR.pm |
This bug is new to 0.25.
perl -v
This is perl, version 5.005_03 built for i386-freebsd
FreeBSD 4.6-STABLE-0714
The attached tarball contains a patch to RR.pm that helps highlight the problem, and a test script that reproduces it. The short version is that when running with -w, the new AUTOLOAD code causes an unitialized variable warning for each new type the first time it's created. On my system, with the attached patch applied the test script produces the following output:
Show quoted text
Debug> class: Net::DNS::RR::NS name: type
Use of uninitialized value at /usr/local/lib/perl5/site_perl/5.005/Net/DNS/RR.pm line 641.
Use of uninitialized value at /usr/local/lib/perl5/site_perl/5.005/Net/DNS/RR.pm line 644.
Show quoted textDebug> class: Net::DNS::RR::NS name: nsdname
Use of uninitialized value at /usr/local/lib/perl5/site_perl/5.005/Net/DNS/RR.pm line 641.
Use of uninitialized value at /usr/local/lib/perl5/site_perl/5.005/Net/DNS/RR.pm line 644.
name servers: dns.viptx.net viper.viptx.net
name servers: viper.viptx.net dns.viptx.net
name servers: dns.viptx.net viper.viptx.net
Show quoted textDebug> class: Net::DNS::RR::A name: name
Use of uninitialized value at /usr/local/lib/perl5/site_perl/5.005/Net/DNS/RR.pm line 641.
Use of uninitialized value at /usr/local/lib/perl5/site_perl/5.005/Net/DNS/RR.pm line 644.
Show quoted textDebug> class: Net::DNS::RR::A name: address
Use of uninitialized value at /usr/local/lib/perl5/site_perl/5.005/Net/DNS/RR.pm line 641.
Use of uninitialized value at /usr/local/lib/perl5/site_perl/5.005/Net/DNS/RR.pm line 644.
Show quoted textDebug> class: Net::DNS::RR::SOA name: serial
Use of uninitialized value at /usr/local/lib/perl5/site_perl/5.005/Net/DNS/RR.pm line 641.
Use of uninitialized value at /usr/local/lib/perl5/site_perl/5.005/Net/DNS/RR.pm line 644.
Serial: 2002050201
If I remove -w from the script, or if I change the code in lines 628-642 in RR.pm back to "return $self->{$name};" like it was in 0.24, everything works ok.
I'm not sure what the solution is, I'm hardly an expert on AUTOLOAD...
Doug
óN= íVmoÛ6öWéWÜvgKä·MFwH±o fçcBÎ0rHªNd¿}GQeI´ÙøÀãswÏH$
éV,g¹l½üÀ÷'£QË÷ý`2òO
áh<h!4!{@Ëø¯¦è1h¥eµy÷¹õÿ(ξëW÷W9ëïàîm»Bò<SýÏ%Ê(º¸\FÑEY|BNgüz#oì
|ëܽ,RW §eá1
c0ð¡æ¬ãcO1'yʱ·w0gÎágdHº*xSÑþí´JÚ=hïsûmü+r¯äOÙ.í·S{Çs&Áañ*Ô"ús¦öçSJyÕ$^|EÕ°7¢_È´Ó¼Þ§|'oU½çÒ-¯Þä[R°¸êè:Þæ|µÎ¿¶-ªÕ3ÒàÞ¶|U.ªY¾0ÿ8Õki¹söÔ.ïvøȪÍUÏîÿz#[àÎR\UOµ6£ÑqNô8G
ǤâO½8J~× ×µï))e'YmÑ©t~G"õ²@RJ]¦Ó§®Ì©Ùù:¬
9/¹:«lxCãêýbqµh¿Um´ôK[^__êïGõI¹Xì´ûõ[¶,*«âÚoeÜe§ÈÝY̲¢¤3ðµuvc&öºÕÖ\g¹ úí3ä2CØñrUàÊDuHëcdP¿<~L¢ãè¸R+PbpÊ]¿~êÂi»,Rïß ¹ìçM kWì ®Eu&RU½*Úz ,Äã t®Ô~¢>ÚÍÖÍòõúöO_ù°Xx»æëõëåPó<æýç¿?ùO´ Tó0üÍóå_@ÿÓùïº.è=pi]g¼«6 øA4
¢¡!}¢ÙÝnWó¬eÅ4ea
hhÊ|î8÷ÆÐU`>·¶<XôceóI7}kÑÚ]»ûøúÀ.Ô<¤³7õÔiôT_Fu¼3ø©ÊbØ¢ÌÊh¨»¤vñðý½£ý£¨vuÔd ±sÿï:ß¿ê9ç (