Net::DNS::Resolver::Mock - Mock a DNS Resolver object for testing
A subclass of Net::DNS::Resolver which parses a zonefile for it's data source. Primarily for use in testing.
my $Resolver = Net::DNS::Resolver::Mock-new();
$Resolver->zonefile_read( $FileName );
$Resolver->zonefile_parse( $String );
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
Clear the debugging list
Returns a list of debugging entries
Please report bugs via the github tracker.
Marc Bradshaw, <firstname.lastname@example.org>
Copyright (c) 2017, Marc Bradshaw.
This library is free software; you may redistribute it and/or modify it under the same terms as Perl itself.
To install Net::DNS::Resolver::Mock, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.