Filename | /usr/share/perl5/URI/http.pm |
Statements | Executed 5 statements in 216µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 12µs | 27µs | BEGIN@6 | URI::http::
0 | 0 | 0 | 0s | 0s | canonical | URI::http::
0 | 0 | 0 | 0s | 0s | default_port | URI::http::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package URI::http; | ||||
2 | |||||
3 | 1 | 92µs | require URI::_server; | ||
4 | 1 | 7µs | @ISA=qw(URI::_server); | ||
5 | |||||
6 | 2 | 116µs | 2 | 41µs | # spent 27µs (12+14) within URI::http::BEGIN@6 which was called:
# once (12µs+14µs) by URI::implementor at line 6 # spent 27µs making 1 call to URI::http::BEGIN@6
# spent 14µs making 1 call to strict::import |
7 | |||||
8 | sub default_port { 80 } | ||||
9 | |||||
10 | sub canonical | ||||
11 | { | ||||
12 | my $self = shift; | ||||
13 | my $other = $self->SUPER::canonical; | ||||
14 | |||||
15 | my $slash_path = defined($other->authority) && | ||||
16 | !length($other->path) && !defined($other->query); | ||||
17 | |||||
18 | if ($slash_path) { | ||||
19 | $other = $other->clone if $other == $self; | ||||
20 | $other->path("/"); | ||||
21 | } | ||||
22 | $other; | ||||
23 | } | ||||
24 | |||||
25 | 1 | 2µs | 1; |