1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
|
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
zonefile_read ( $FileName )
Reads specified file for zone data
zonefile_parse ( $String )
Reads the zone data from the supplied string
die_on ( $Name, $Type, $Error )
Die with $Error for a query of $Name and $Type
enable_debug ()
Once set, the resolver will write any lookups received to STDERR and
will be available via the following methods
disble_debug ()
Disable debugging
clear_debug ()
Clear the debugging list
get_debug ()
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.
|