On Monday, April 13, 2015 at 10:10:52 AM UTC-5, jcbollinger wrote:
> The sort key is then formed as a two-element array: the first element is 
> -1 if no address is given, else the 4-byte integer IP address, and the 
> second element is the string tail.
>

Note that the important thing for consistency is that whole hash key 
appears in one form or another in the sort key.

Note, too, that this scheme could be extended fairly easily to sort 
numerically by (starting) port number as well.  The version given will sort 
lexicographically by the tail, so you would get this relative order, for 
instance:

1.2.3.4:8000 blah
1.2.3.4:81 blah blah
1.2.3.4:820-821 waffle


John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/000a2c88-9740-4bed-94dc-7d19d4798b36%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to