DNS-NIOS

 view release on metacpan or  search on metacpan

t/tlib/Test/NIOS.pl  view on Meta::CPAN


    }
  };

};

sub _random_record {
  my $name = lc guid_string() . ".ext.home";

  my @digits;
  for ( 0 .. 3 ) {
    push @digits, int( rand(255) + 1 );
  }
  my $ipv4addr = join '.', @digits;

  return _a_record_from_payload(
    {
      name     => $name,
      ipv4addr => $ipv4addr
    }
  );
}

sub _a_record_from_payload {
  my $json_payload = shift;
  $json_payload->{_ref} =
    'record:a/' . lc guid_string() . ":$json_payload->{name}/default";
  $json_payload->{view} = "default";
  return $json_payload;
}

app->start;

__DATA__

@@ Result_set_too_large.json.ep
{
  "Error": "AdmConProtoError: Result set too large (> 1000)",
  "code": "Client.Ibap.Proto",
  "text": "Result set too large (> 1000)"
}

@@ Need_return_as_object.json.ep
{
  "Error": "AdmConProtoError: _return_as_object needs to be enabled for paging requests.",
  "code": "Client.Ibap.Proto",
  "text": "_return_as_object needs to be enabled for paging requests."
}

@@ AuthRequired.html.ep
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html>
  <head>
    <title>401 Authorization Required</title>
  </head>
  <body>
    <h1>Authorization Required</h1>
    <p>This server could not verify that you
    are authorized to access the document
    requested.  Either you supplied the wrong
    credentials (e.g., bad password), or your
    browser doesn't understand how to supply
    the credentials required.</p>
  </body>
</html>

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.637 second using v1.00-cache-2.02-grep-82fe00e-cpan-fdf144b69116 )