Content deleted Content added
→isIpV4Range and isIpV6Range: Reply |
|||
(4 intermediate revisions by 3 users not shown) | |||
Line 118:
:This looks good, thanks. I updated [[Module:IPAddress/sandbox]] with a slightly tweaked version of the above (just a slight re-ordering to suit what is already in the module) and will do a final check a little later. [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 22:47, 3 February 2022 (UTC)
::Done. [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 01:01, 4 February 2022 (UTC)
:::Thank you very much! {{smiley}} <span style="background:#ffff55">'''''[[User:Chlod|Chlod]]'''''</span> <small style="font-size:calc(1em - 2pt)">([[User talk:Chlod|say hi!]])</small> 09:53, 4 February 2022 (UTC)
== isIpV4Range and isIpV6Range ==
I've created the new functions isIpV4Range and isIpV6Range which do exactly what it sounds like. This is for use in [[Template:Vandal]] but can probably come in handy in other places as well. If noone objects in the next few days I will take the code in the sandbox live. There are testcases. --[[User:Trialpears|Trialpears]] ([[User talk:Trialpears|talk]]) 18:30, 10 January 2023 (UTC)
:i do not see any such functions in the snadbox.
:i am guessing the functions you describe reside somewhere else. furthermore, i am guessing they are in the same vein as _isIpOrRange().
:presuming this is the case, i'll say what i should have said when this function was added: i think it's utterly silly. not the function itself, of course, but its inclusion in this module. i can't imagine what is the added value of placing in module A a function that does nothing but pipe calls to module B.
:this practice makes sense when some of the "native" functions of A are using this implanted function, but this is not the case here, and _isIpOrRange, as well as the 2 new functions you describe are entirely for "export" purposes. all they do is pipe functionality of [[Module:IP]], and my common sense says they should reside there. what is the value of planting this "foreign body" here?
:tl;dr: please consider placing these new functions in module IP rather than here.
:peace. [[User:קיפודנחש|קיפודנחש (aka kipod)]] ([[User talk:קיפודנחש|talk]]) 19:47, 10 January 2023 (UTC)
::@[[User:קיפודנחש|קיפודנחש]] [https://en.wikipedia.org/w/index.php?title=Module:IPAddress/sandbox&diff=1132811434&oldid=1069755838 Here] is a diff with the code at [[Module:IPAddress/sandbox]] and testcases at [[Module talk:IPAddress/testcases]].
::In principal I'm not opposed to having this in [[Module:IP]] instead, but if were going to have two separate modules, which the [[Wikipedia:Templates_for_discussion/Log/2018_July_1#Module:IP|2018 TfD]] thought was for the best, I feel this fits better here than in [[Module:IP]] since it's intended to be easy to use in templates while IP seems to have functions primarily intended for use in Modules. --[[User:Trialpears|Trialpears]] ([[User talk:Trialpears|talk]]) 20:22, 10 January 2023 (UTC)
:::thanks. don't know how i missed them earlier. i have some excuses, but i doubt anyone here will be interested.
:::those functions seem to be in the right place - they do use the functionality of this module, and do belong here, contrary to my previous assumption they do not, which was made before reading the code. thanks.
:::btw, the addition of these functions (retroactively) justifies the inclusion of _isIpOrRange() here...
:::will be good to add testcases, both positive and negative, before merging the sandbox to the module itself.
:::peace. [[User:קיפודנחש|קיפודנחש (aka kipod)]] ([[User talk:קיפודנחש|talk]]) 00:10, 11 January 2023 (UTC)
|