| 1 | |||||||||||
| 2 | #use diagnostics; | ||||||||||
| 3 | 1 | ▶ | use NetAddr::IP::Lite; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | |||||||||||
| 5 | 1 | ▶ | END {print "1..1\nnot ok 1\n" unless $test}; | ||||||||
|
Subroutine
END: called CC=2 SCAR=7.6
Branch: 1 branch
| |||||||||||
| 6 | |||||||||||
| 7 | 1 | $| = 1; | |||||||||
| 8 | |||||||||||
| 9 | 1 | $test = 1; | |||||||||
| 10 | 3 | ▶ | sub ok() { | ||||||||
|
Subroutine
ok: called CC=1 SCAR=0.0
| |||||||||||
| 11 | 3 | print 'ok ',$test++,"\n"; | |||||||||
| 12 | } | ||||||||||
| 13 | |||||||||||
| 14 | 1 | my @addrs = # pathological cases should fail | |||||||||
| 15 | qw( ::foo | ||||||||||
| 16 | ::f00/129 | ||||||||||
| 17 | ::f00/150 | ||||||||||
| 18 | ); | ||||||||||
| 19 | |||||||||||
| 20 | 1 | print '1..',(scalar @addrs),"\n"; | |||||||||
| 21 | |||||||||||
| 22 | 1 | my $ip; | |||||||||
| 23 | 1 | foreach(@addrs) { | |||||||||
| 24 | 3 | ▶ | print "expected undef, got: $ip\nnot " | ||||||||
|
Branch: 1 branch
| |||||||||||
| 25 | if ($ip = new NetAddr::IP::Lite($_)); | ||||||||||
| 26 | 3 | &ok; | |||||||||
| 27 | } | ||||||||||