| Server IP : 162.214.74.102 / Your IP : 216.73.216.192 Web Server : Apache System : Linux dedi-4363141.lrsys.com.br 3.10.0-1160.119.1.el7.tuxcare.els25.x86_64 #1 SMP Wed Oct 1 17:37:27 UTC 2025 x86_64 User : lrsys ( 1015) PHP Version : 5.6.40 Disable Function : exec,passthru,shell_exec,system MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/local/lib64/perl5/auto/NetAddr/IP/ |
Upload File : |
# NOTE: Derived from blib/lib/NetAddr/IP.pm.
# Changes made here will be lost when autosplit is run again.
# See AutoSplit.pm.
package NetAddr::IP;
#line 829 "blib/lib/NetAddr/IP.pm (autosplit into blib/lib/auto/NetAddr/IP/_compV6.al)"
#sub _old_compV6 {
# my @addr = split(':',shift);
# my $found = 0;
# my $v;
# foreach(0..$#addr) {
# ($v = $addr[$_]) =~ s/^0+//;
# $addr[$_] = $v || 0;
# }
# @_ = reverse(1..$#addr);
# foreach(@_) {
# if ($addr[$_] || $addr[$_ -1]) {
# last if $found;
# next;
# }
# $addr[$_] = $addr[$_ -1] = '';
# $found = '1';
# }
# (my $rv = join(':',@addr)) =~ s/:+:/::/;
# return $rv;
#}
# thanks to Rob Riepel <riepel@networking.Stanford.EDU>
# for this faster and more compact solution 11-17-08
sub _compV6 ($) {
my $ip = shift;
return $ip unless my @candidates = $ip =~ /((?:^|:)0(?::0)+(?::|$))/g;
my $longest = (sort { length($b) <=> length($a) } @candidates)[0];
$ip =~ s/$longest/::/;
return $ip;
}
# end of NetAddr::IP::_compV6
1;