Bug#517361: "our" and autosplit don't mix well

Nicholas Bamber nicholas at periapt.co.uk
Thu Oct 14 12:54:44 UTC 2010


Dominique,
    I was wondering if that might be the problem but not having 
experience of autosplit it was a completeley wild guess on my part. If 
Brent can reproduce the problem we could supply him with a patched 
version to test and send the patch onto upstream.

Dominique Dumont wrote:
> On Thursday 14 October 2010 13:42:54 Nicholas Bamber wrote:
>   
>> I don't suppose you could think of a way to reproduce this outside of
>> assassin?
>>     
>
> I've looked at $NetAddr::IP::Util. This reminds me of old painful memories 
> when I played with autosplit (or was it the reverse ? ;-) )
>
> The error message :
> Feb 27 11:24:35 mail spamd[16173]: Use of uninitialized value 
> $NetAddr::IP::Util::n2d_format in sprintf at ../../blib/lib/NetAddr/IP/Util.pm 
> (autosplit into ../../blib/lib/auto/NetAddr/IP/Util/ipv6_n2d.al) line 356, 
> <GEN1757> line 153.
>
> shows that autosplit was used: each method is located in its own file.
>
> And in main $NetAddr::IP::Util we have this declaration:
>
>  our $n2d_format = "%X:%X:%X:%X:%X:%X:%D.%D.%D.%D";
>
> The problem is that the scope of 'our' declaration is limited to the 
> compilation block (the file). When autosplit is used, the 'our' declaration 
> and the ipv6_n2d file are located in 2 separate files. Hence the undef 
> warning.
>
> The fix is quite simple: both variables declared with 'our' needs to be 
> changed into global variables. (use vars qw/$n2d_format $n2x_format/;)
>
> But you should talk with upstream for this issue.
>
> Dominique
> --
> http://config-model.wiki.sourceforge.net/ -o- http://search.cpan.org/~ddumont/
> http://www.ohloh.net/accounts/ddumont     -o- http://ddumont.wordpress.com/
>
>
>   

-------------- next part --------------
A non-text attachment was scrubbed...
Name: nicholas.vcf
Type: text/x-vcard
Size: 185 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20101014/2cf14c62/attachment.vcf>


More information about the pkg-perl-maintainers mailing list