- my $list = $ipv4->list;
- _put($list, 4) if $list;
- $list = $ipv6->list;
- _put($list, 6) if $list;
+ _put($ipv4, 4) if $count4;
+ _put($ipv6, 6) if $count6;
+}
+
+sub _sort
+{
+ my @in;
+ my @out;
+ for (@_) {
+ push @in, [inet_pton($_), split m|/|];
+ }
+ @out = sort {$a->[0] <=> $b->[0]} @in;
+ return map { "$_->[1]/$_->[2]"} @out;