Module talk:IPAddress: Difference between revisions

Content deleted Content added
Line 86:
:::::::I edited the sandbox to fix the globals. However I added a TODO note which is going to require quite a bit of thought because the changes (to accept ranges as noted above) might not be compatible with how this module is used. I'm not even sure if it is desirable: should 1.2.3.4/5 be regarded as a valid IPv4 address? Also, the testcases need thought. [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 08:38, 28 March 2021 (UTC)
::::::::My use case is distinguishing IPv4 address/CIDR from IPv6 address/CIDR (for {{tl|Proxyip}}, {{tl|Proxyip4}}, {{tl|Proxyip6}}). I then use isIpOrRange or other methods to check if it's a range. My guess is that for any template or module using it for usernames it shouldn't make any difference. If you think the breakage risk is too high, then I would go for new functions like isIpV4AddressOrRange and isIpV6AddressOrRange. Although it can be simpler to keep it to 2 orthogonal aspects: IPv4 vs IPv6 and address vs range. [[User:MarioGom|MarioGom]] ([[User talk:MarioGom|talk]]) 14:30, 31 March 2021 (UTC)
:::::::::(disclosure: i wrote this module years ago, i think per some request in wp:vpt or wp:lua): can one of you guys, in one of the next passes, also make the functions in this module "local"? it's a bit of a sticking point... peace - [[User:קיפודנחש|קיפודנחש (aka kipod)]] ([[User talk:קיפודנחש|talk]]) 17:39, 31 March 2021 (UTC)