G'day Kallewirsch,
There are a number of modules that will give you a snapshot of an object.
Here's a selection (all of these are configurable; see doco for details):
Here's a quick example of each:
$ perl -E '
use strict;
use warnings;
use Net::DNS::Packet;
my $obj = Net::DNS::Packet::->new(qw{example.com MX IN});
say "\n*** Data::Dumper";
use Data::Dumper;
print Dumper $obj;
say "\n*** Data::Dump";
use Data::Dump;
dd $obj;
say "\n*** Data::Printer";
use Data::Printer;
p $obj;
'
*** Data::Dumper
$VAR1 = bless( {
'status' => 0,
'authority' => [],
'answer' => [],
'additional' => [],
'question' => [
bless( {
'qtype' => 15,
'qclass' => 1,
'qname' => bless( {
'label'
+=> [
+ 'example',
+ 'com'
+ ]
}, 'Net::D
+NS::DomainName1035' )
}, 'Net::DNS::Question' )
]
}, 'Net::DNS::Packet' );
*** Data::Dump
bless({
additional => [],
answer => [],
authority => [],
question => [
bless({
qclass => 1,
qname => bless({ label => ["example", "com"] }, "
+Net::DNS::DomainName1035"),
qtype => 15,
}, "Net::DNS::Question"),
],
status => 0,
}, "Net::DNS::Packet")
*** Data::Printer
Net::DNS::Packet {
public methods (38):
additional, answer, answerfrom, answersize, authority, data, d
+ecode, dump, edns, encode, from, header, HEADER_LENGTH, new, pop, pre
+, prerequisite, print, push, question, reply, sign_sig0, sign_tsig, s
+igrr, size, string, truncate, UDPSZ, unique_push, update, verify, ver
+ifyerr, zone
Carp:
carp, confess, croak
Net::DNS::Parameters:
dsotypebyname, dsotypebyval
private methods (1): _section
internals: {
additional [],
answer [],
authority [],
question [
[0] Net::DNS::Question
],
status 0
}
}
See also:
|