[mrtg-developers] Re: perl compatibity

Tobias Oetiker oetiker at ee.ethz.ch
Fri Jun 20 16:46:07 MEST 2003


Today Lorenzo Colitti wrote:

> Simon Leinen wrote:
> > I don't like this change too much (and it's a change to my code):
> >
> >>+	no strict "subs";
> >> 	$ipv6_addr_len = length(pack_sockaddr_in6(161, inet_pton(AF_INET6, "::1")));
> >>+	use strict "subs";
> >
> > Why don't you simply write "AF_INET6()" instead of "AF_INET6"?
> >
> > Doesn't that work on all versions?
>
> I didn't write AF_INET6() because I didn't know you could do it! :-)
> I'm no Perl expert, unfortunately.
>
> AF_INET6() does seem to work both on Perl 5.6.1 and 5.8.0, with and
> without IPv6, but I don't know about 5.005 as I don't have it.
>
> Tobi, maybe you have an installation of 5.005 you can test it on? You
> would just need to back out the patch-SNMP_Session-bareword I sent you
> the day before yesterday, then change this line in SNMP_Session.pm:
>
> >  	$ipv6_addr_len = length(pack_sockaddr_in6(161, inet_pton(AF_INET6, "::1")));
>
> (should be around line 127) to this:
>
> >  	$ipv6_addr_len = length(pack_sockaddr_in6(161, inet_pton(AF_INET6(), "::1")));
>
> and then see if cfgmaker and/or mrtg still work on 5.6.0.
>
> There are a couple more "no strict subs; foo(AF_INET6); use strict
> subs;" in SNMP_Session.pm, and I think there's one more in MRTG. If
> AF_INET6() is found to work on 5.005, perhaps we should remove all of
> them? Simon, Tobi, what do you think? I can whip up a patch if you like.

the AF_INET6() thing works fine with perl 5.00502 as fahr as I can
see, so patch would be welcome


tobi
>
> Regards,
> Lorenzo
>

-- 
 ______    __   _
/_  __/_  / /  (_) Oetiker @ ISG.EE, ETZ J97, ETH, CH-8092 Zurich
 / // _ \/ _ \/ /  System Manager, Time Lord, Coder, Designer, Coach
/_/ \.__/_.__/_/   http://people.ee.ethz.ch/~oetiker   +41(0)1-632-5286

--
Unsubscribe mailto:mrtg-developers-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:mrtg-developers-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/mrtg-developers



More information about the mrtg-developers mailing list