Filename | /usr/local/lib/perl5/site_perl/Net/DNS/Resolver/UNIX.pm |
Statements | Executed 23 statements in 1.17ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 128µs | 2.18ms | _init | Net::DNS::Resolver::UNIX::
3 | 2 | 1 | 72µs | 72µs | CORE:ftfile (opcode) | Net::DNS::Resolver::UNIX::
1 | 1 | 1 | 50µs | 64µs | BEGIN@16 | Net::DNS::Resolver::UNIX::
1 | 1 | 1 | 46µs | 46µs | CORE:backtick (opcode) | Net::DNS::Resolver::UNIX::
1 | 1 | 1 | 27µs | 58µs | BEGIN@17 | Net::DNS::Resolver::UNIX::
1 | 1 | 1 | 22µs | 144ms | BEGIN@18 | Net::DNS::Resolver::UNIX::
1 | 1 | 1 | 4µs | 4µs | CORE:fteread (opcode) | Net::DNS::Resolver::UNIX::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package Net::DNS::Resolver::UNIX; | ||||
2 | |||||
3 | # | ||||
4 | # $Id: UNIX.pm 1573 2017-06-12 11:03:59Z willem $ | ||||
5 | # | ||||
6 | 1 | 3µs | our $VERSION = (qw$LastChangedRevision: 1573 $)[1]; | ||
7 | |||||
8 | |||||
9 | =head1 NAME | ||||
10 | |||||
11 | Net::DNS::Resolver::UNIX - Unix resolver class | ||||
12 | |||||
13 | =cut | ||||
14 | |||||
15 | |||||
16 | 2 | 61µs | 2 | 78µs | # spent 64µs (50+14) within Net::DNS::Resolver::UNIX::BEGIN@16 which was called:
# once (50µs+14µs) by base::import at line 16 # spent 64µs making 1 call to Net::DNS::Resolver::UNIX::BEGIN@16
# spent 14µs making 1 call to strict::import |
17 | 2 | 102µs | 2 | 90µs | # spent 58µs (27+32) within Net::DNS::Resolver::UNIX::BEGIN@17 which was called:
# once (27µs+32µs) by base::import at line 17 # spent 58µs making 1 call to Net::DNS::Resolver::UNIX::BEGIN@17
# spent 32µs making 1 call to warnings::import |
18 | 2 | 483µs | 2 | 144ms | # spent 144ms (22µs+144) within Net::DNS::Resolver::UNIX::BEGIN@18 which was called:
# once (22µs+144ms) by base::import at line 18 # spent 144ms making 1 call to Net::DNS::Resolver::UNIX::BEGIN@18
# spent 144ms making 1 call to base::import, recursion: max depth 1, sum of overlapping time 144ms |
19 | |||||
20 | |||||
21 | 1 | 65µs | 2 | 38µs | my @config_file = grep -f $_ && -r _, '/etc/resolv.conf'; # spent 33µs making 1 call to Net::DNS::Resolver::UNIX::CORE:ftfile
# spent 4µs making 1 call to Net::DNS::Resolver::UNIX::CORE:fteread |
22 | |||||
23 | 1 | 2µs | my $dotfile = '.resolv.conf'; | ||
24 | 1 | 14µs | my @dotpath = grep defined, $ENV{HOME}, '.'; | ||
25 | 1 | 70µs | 2 | 39µs | my @dotfile = grep -f $_ && -o _, map "$_/$dotfile", @dotpath; # spent 39µs making 2 calls to Net::DNS::Resolver::UNIX::CORE:ftfile, avg 20µs/call |
26 | |||||
27 | |||||
28 | 1 | 62µs | local $ENV{PATH} = '/bin:/usr/bin'; | ||
29 | 2 | 62µs | 1 | 46µs | my $uname = eval {`uname -n 2>/dev/null`} || ''; # spent 46µs making 1 call to Net::DNS::Resolver::UNIX::CORE:backtick |
30 | 1 | 3µs | chomp $uname; | ||
31 | 1 | 6µs | my ( $host, @domain ) = split /\./, $uname, 2; | ||
32 | 1 | 17µs | 1 | 80µs | __PACKAGE__->domain(@domain); # spent 80µs making 1 call to Net::DNS::Resolver::Base::domain |
33 | |||||
34 | |||||
35 | # spent 2.18ms (128µs+2.06) within Net::DNS::Resolver::UNIX::_init which was called:
# once (128µs+2.06ms) by Net::DNS::Resolver::Base::new at line 130 of Net/DNS/Resolver/Base.pm | ||||
36 | 1 | 7µs | 1 | 4µs | my $defaults = shift->_defaults; # spent 4µs making 1 call to Net::DNS::Resolver::Base::_defaults |
37 | |||||
38 | 1 | 11µs | 1 | 711µs | map $defaults->_read_config_file($_), @config_file; # spent 711µs making 1 call to Net::DNS::Resolver::Base::_read_config_file |
39 | |||||
40 | 1 | 73µs | 1 | 1.32ms | %$defaults = Net::DNS::Resolver::Base::_untaint(%$defaults); # spent 1.32ms making 1 call to Net::DNS::Resolver::Base::_untaint |
41 | |||||
42 | 1 | 3µs | map $defaults->_read_config_file($_), @dotfile; | ||
43 | |||||
44 | 1 | 15µs | 1 | 26µs | $defaults->_read_env; # spent 26µs making 1 call to Net::DNS::Resolver::Base::_read_env |
45 | } | ||||
46 | |||||
47 | |||||
48 | 1 | 107µs | 1; | ||
49 | __END__ | ||||
# spent 46µs within Net::DNS::Resolver::UNIX::CORE:backtick which was called:
# once (46µs+0s) by base::import at line 29 | |||||
# spent 4µs within Net::DNS::Resolver::UNIX::CORE:fteread which was called:
# once (4µs+0s) by base::import at line 21 | |||||
sub Net::DNS::Resolver::UNIX::CORE:ftfile; # opcode |