| Filename | /home/ss5/perl5/perlbrew/perls/perl-5.22.0/lib/site_perl/5.22.0/URI/http.pm |
| Statements | Executed 8 statements in 110µs |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 11µs | 13µs | URI::http::BEGIN@3 |
| 1 | 1 | 1 | 7µs | 2.32ms | URI::http::BEGIN@8 |
| 1 | 1 | 1 | 6µs | 9µs | URI::http::BEGIN@4 |
| 0 | 0 | 0 | 0s | 0s | URI::http::canonical |
| 0 | 0 | 0 | 0s | 0s | URI::http::default_port |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package URI::http; | ||||
| 2 | |||||
| 3 | 2 | 18µs | 2 | 14µs | # spent 13µs (11+2) within URI::http::BEGIN@3 which was called:
# once (11µs+2µs) by URI::implementor at line 3 # spent 13µs making 1 call to URI::http::BEGIN@3
# spent 2µs making 1 call to strict::import |
| 4 | 2 | 25µs | 2 | 13µs | # spent 9µs (6+4) within URI::http::BEGIN@4 which was called:
# once (6µs+4µs) by URI::implementor at line 4 # spent 9µs making 1 call to URI::http::BEGIN@4
# spent 4µs making 1 call to warnings::import |
| 5 | |||||
| 6 | 1 | 200ns | our $VERSION = "1.69"; | ||
| 7 | |||||
| 8 | 2 | 65µs | 2 | 4.62ms | # spent 2.32ms (7µs+2.31) within URI::http::BEGIN@8 which was called:
# once (7µs+2.31ms) by URI::implementor at line 8 # spent 2.32ms making 1 call to URI::http::BEGIN@8
# spent 2.31ms making 1 call to parent::import |
| 9 | |||||
| 10 | sub default_port { 80 } | ||||
| 11 | |||||
| 12 | sub canonical | ||||
| 13 | { | ||||
| 14 | my $self = shift; | ||||
| 15 | my $other = $self->SUPER::canonical; | ||||
| 16 | |||||
| 17 | my $slash_path = defined($other->authority) && | ||||
| 18 | !length($other->path) && !defined($other->query); | ||||
| 19 | |||||
| 20 | if ($slash_path) { | ||||
| 21 | $other = $other->clone if $other == $self; | ||||
| 22 | $other->path("/"); | ||||
| 23 | } | ||||
| 24 | $other; | ||||
| 25 | } | ||||
| 26 | |||||
| 27 | 1 | 2µs | 1; |