HEX
Server: Apache
System: Linux server-674799.igrow.ws 5.14.0-611.30.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Feb 11 06:42:00 EST 2026 x86_64
User: elrashedytravel (1025)
PHP: 8.1.34
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/.cpan/build/NetAddr-IP-4.079-0/Lite/t/is_local.t
#use diagnostics;
use NetAddr::IP::Lite;

$| = 1;

print "1..9\n";

my $test = 1;
sub ok() {
  print 'ok ',$test++,"\n";
}

my @ips = qw(
	126.255.255.255	0
	127.0.0.0	1
	127.0.0.1	1
	127.255.255.254	1
	127.255.255.255	1
	128.0.0.0	0
	::0		0
	::1		1
	::2		0

);


for (my $i=0;$i<=$#ips;$i+=2) {
  my $ip = new NetAddr::IP::Lite($ips[$i]);
  my $got = $ip->is_local();
  my $exp = $ips[$i+1];
  print $ip," got: $got, exp: $exp\nnot "
	unless $got == $exp;
  &ok;
}