HEX
Server: Apache
System: Linux server-634962.emtiyz.com 5.14.0-611.11.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Dec 3 09:47:37 EST 2025 x86_64
User: codo66ho (1003)
PHP: 8.2.29
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //home/.cpan/build/NetAddr-IP-4.079-0/t/wildcard.t
use NetAddr::IP;

my @addr = (
	[ 'localhost', '0.0.0.0' ],
	[ '10.0.0.0/24', '0.0.0.255' ],
	[ '192.168.0.0/16', '0.0.255.255' ],
	[ '10.128.0.1/17', '0.0.127.255' ]
);

$| = 1;

print "1..", 2 * scalar @addr, "\n";

my $count = 1;

for my $a (@addr) {
    my $ip = new NetAddr::IP $a->[0];

    if ($ip->wildcard eq $a->[1]) {
	print "ok $count\n";
    }
    else {
	print "not ok $count\n";
    }

    ++$count;


    if (($ip->wildcard)[1] eq $a->[1]) {
	print "ok $count\n";
    }
    else {
	print "not ok $count\n";
    }

    ++$count;
}