Scroll to navigation

Net::DNS::Resolver::Mock(3pm) User Contributed Perl Documentation Net::DNS::Resolver::Mock(3pm)

NAME

Net::DNS::Resolver::Mock - Mock a DNS Resolver object for testing

DESCRIPTION

A subclass of Net::DNS::Resolver which parses a zonefile for it's data source. Primarily for use in testing.

SYNOPSIS

    use Net::DNS::Resolver::Mock;
    my $Resolver = Net::DNS::Resolver::Mock-new();
    $Resolver->zonefile_read( $FileName );
    # or
    $Resolver->zonefile_parse( $String );

PUBLIC METHODS

Reads specified file for zone data
Reads the zone data from the supplied string
Die with $Error for a query of $Name and $Type
Once set, the resolver will write any lookups received to STDERR and will be available via the following methods
Disable debugging
Clear the debugging list
Returns a list of debugging entries

DEPENDENCIES

  Net::DNS::Resolver
  Net::DNS::Packet
  Net::DNS::Question
  Net::DNS::ZoneFile

BUGS

Please report bugs via the github tracker.

https://github.com/marcbradshaw/Net-DNS-Resolver-Mock/issues

AUTHORS

Marc Bradshaw, <marc@marcbradshaw.net>

COPYRIGHT

Copyright (c) 2017, Marc Bradshaw.

LICENCE

This library is free software; you may redistribute it and/or modify it under the same terms as Perl itself.

2020-02-22 perl v5.30.0