Zonemaster-Engine
view release on metacpan or search on metacpan
t/TestUtil.pm view on Meta::CPAN
=back
=cut
sub _check_ns_expressions {
my ( $scenario, $ns_expressions ) = @_;
return if ! defined $ns_expressions;
foreach my $nsexp ( @{ $ns_expressions } ) {
my ( $ns, $ip ) = split m(/), $nsexp;
croak "Scenario $scenario: Name server name '$ns' in '$nsexp' is not valid" if $ns !~ /^[0-9A-Za-z-.]+$/;
if ( $ip ) {
croak "Scenario $scenario: IP address '$ip' in '$nsexp' is not valid"
unless validate_ipv4( $ip ) or validate_ipv6( $ip );
}
}
}
sub _check_ds_expressions {
t/TestUtil.pm view on Meta::CPAN
if ( not $testable ) {
push @untested_scenarios, $scenario;
next;
}
subtest $scenario => sub {
if ( @$undelegated_ns ) {
my %undel_ns;
foreach my $nsexp ( @$undelegated_ns ) {
my ( $ns, $ip ) = split m(/), $nsexp;
$undel_ns{$ns} //= [];
push @{ $undel_ns{$ns} }, $ip if $ip;
}
# Use default value of "fill_in_empty_oob_glue".
Zonemaster::Engine->add_fake_delegation( $zone_name => \%undel_ns, fill_in_empty_oob_glue => 1 );
}
# Method: get_parent_ns_names_and_ips()
my $method = 'get_parent_ns_names_and_ips';
t/TestUtil.pm view on Meta::CPAN
if ( not $testable ) {
push @untested_scenarios, $scenario;
next;
}
subtest $scenario => sub {
if ( @$undelegated_ns ) {
my %undel_ns;
foreach my $nsexp ( @$undelegated_ns ) {
my ($ns, $ip) = split m(/), $nsexp;
$undel_ns{$ns} //= [];
push @{ $undel_ns{$ns} }, $ip if $ip;
}
# Use default value of "fill_in_empty_oob_glue".
Zonemaster::Engine->add_fake_delegation( $zone_name => \%undel_ns, fill_in_empty_oob_glue => 1 );
}
if ( @$undelegated_ds ) {
my @data;
( run in 0.773 second using v1.01-cache-2.11-cpan-5511b514fd6 )