Filename | /usr/local/lib/perl5/site_perl/Net/DNS/Resolver/UNIX.pm |
Statements | Executed 23 statements in 1.13ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 121µs | 2.33ms | _init | Net::DNS::Resolver::UNIX::
1 | 1 | 1 | 60µs | 74µs | BEGIN@16 | Net::DNS::Resolver::UNIX::
3 | 2 | 1 | 50µs | 50µs | CORE:ftfile (opcode) | Net::DNS::Resolver::UNIX::
1 | 1 | 1 | 47µs | 47µs | CORE:backtick (opcode) | Net::DNS::Resolver::UNIX::
1 | 1 | 1 | 32µs | 64µs | BEGIN@17 | Net::DNS::Resolver::UNIX::
1 | 1 | 1 | 25µs | 143ms | BEGIN@18 | Net::DNS::Resolver::UNIX::
1 | 1 | 1 | 5µs | 5µ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 | 67µs | 2 | 88µs | # spent 74µs (60+14) within Net::DNS::Resolver::UNIX::BEGIN@16 which was called:
# once (60µs+14µs) by base::import at line 16 # spent 74µs making 1 call to Net::DNS::Resolver::UNIX::BEGIN@16
# spent 14µs making 1 call to strict::import |
17 | 2 | 61µs | 2 | 96µs | # spent 64µs (32+32) within Net::DNS::Resolver::UNIX::BEGIN@17 which was called:
# once (32µs+32µs) by base::import at line 17 # spent 64µs making 1 call to Net::DNS::Resolver::UNIX::BEGIN@17
# spent 32µs making 1 call to warnings::import |
18 | 2 | 491µs | 2 | 143ms | # spent 143ms (25µs+143) within Net::DNS::Resolver::UNIX::BEGIN@18 which was called:
# once (25µs+143ms) by base::import at line 18 # spent 143ms making 1 call to Net::DNS::Resolver::UNIX::BEGIN@18
# spent 143ms making 1 call to base::import, recursion: max depth 1, sum of overlapping time 143ms |
19 | |||||
20 | |||||
21 | 1 | 64µs | 2 | 36µs | my @config_file = grep -f $_ && -r _, '/etc/resolv.conf'; # spent 32µs making 1 call to Net::DNS::Resolver::UNIX::CORE:ftfile
# spent 5µs making 1 call to Net::DNS::Resolver::UNIX::CORE:fteread |
22 | |||||
23 | 1 | 2µs | my $dotfile = '.resolv.conf'; | ||
24 | 1 | 11µs | my @dotpath = grep defined, $ENV{HOME}, '.'; | ||
25 | 1 | 54µs | 2 | 18µs | my @dotfile = grep -f $_ && -o _, map "$_/$dotfile", @dotpath; # spent 18µs making 2 calls to Net::DNS::Resolver::UNIX::CORE:ftfile, avg 9µs/call |
26 | |||||
27 | |||||
28 | 1 | 64µs | local $ENV{PATH} = '/bin:/usr/bin'; | ||
29 | 2 | 63µs | 1 | 47µs | my $uname = eval {`uname -n 2>/dev/null`} || ''; # spent 47µ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 | 16µs | 1 | 64µs | __PACKAGE__->domain(@domain); # spent 64µs making 1 call to Net::DNS::Resolver::Base::domain |
33 | |||||
34 | |||||
35 | # spent 2.33ms (121µs+2.21) within Net::DNS::Resolver::UNIX::_init which was called:
# once (121µs+2.21ms) 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 | 851µs | map $defaults->_read_config_file($_), @config_file; # spent 851µs making 1 call to Net::DNS::Resolver::Base::_read_config_file |
39 | |||||
40 | 1 | 59µs | 1 | 1.33ms | %$defaults = Net::DNS::Resolver::Base::_untaint(%$defaults); # spent 1.33ms making 1 call to Net::DNS::Resolver::Base::_untaint |
41 | |||||
42 | 1 | 3µs | map $defaults->_read_config_file($_), @dotfile; | ||
43 | |||||
44 | 1 | 19µ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 | 122µs | 1; | ||
49 | __END__ | ||||
# spent 47µs within Net::DNS::Resolver::UNIX::CORE:backtick which was called:
# once (47µs+0s) by base::import at line 29 | |||||
# spent 5µs within Net::DNS::Resolver::UNIX::CORE:fteread which was called:
# once (5µs+0s) by base::import at line 21 | |||||
sub Net::DNS::Resolver::UNIX::CORE:ftfile; # opcode |