| Filename | /home/hinrik/perl5/perlbrew/perls/perl-5.13.5/lib/site_perl/5.13.5/Regexp/Common/URI/RFC1738.pm |
| Statements | Executed 67 statements in 754µs |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 25µs | 105µs | Regexp::Common::URI::RFC1738::BEGIN@3 |
| 1 | 1 | 1 | 18µs | 942µs | Regexp::Common::URI::RFC1738::BEGIN@33 |
| 1 | 1 | 1 | 13µs | 13µs | Regexp::Common::URI::RFC1738::BEGIN@19 |
| 1 | 1 | 1 | 12µs | 16µs | Regexp::Common::URI::RFC1738::BEGIN@5 |
| 1 | 1 | 1 | 11µs | 21µs | Regexp::Common::URI::RFC1738::BEGIN@6 |
| 1 | 1 | 1 | 10µs | 44µs | Regexp::Common::URI::RFC1738::BEGIN@8 |
| 1 | 1 | 1 | 10µs | 107µs | Regexp::Common::URI::RFC1738::BEGIN@11 |
| 1 | 1 | 1 | 6µs | 6µs | Regexp::Common::URI::RFC1738::BEGIN@13 |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package Regexp::Common::URI::RFC1738; | ||||
| 2 | |||||
| 3 | 2 | 28µs | 2 | 105µs | # spent 105µs (25+80) within Regexp::Common::URI::RFC1738::BEGIN@3 which was called:
# once (25µs+80µs) by Regexp::Common::URI::file::BEGIN@5 at line 3 # spent 105µs making 1 call to Regexp::Common::URI::RFC1738::BEGIN@3
# spent 80µs making 1 call to Regexp::Common::import, recursion: max depth 1, sum of overlapping time 80µs |
| 4 | |||||
| 5 | 2 | 25µs | 2 | 21µs | # spent 16µs (12+4) within Regexp::Common::URI::RFC1738::BEGIN@5 which was called:
# once (12µs+4µs) by Regexp::Common::URI::file::BEGIN@5 at line 5 # spent 16µs making 1 call to Regexp::Common::URI::RFC1738::BEGIN@5
# spent 4µs making 1 call to strict::import |
| 6 | 2 | 27µs | 2 | 30µs | # spent 21µs (11+9) within Regexp::Common::URI::RFC1738::BEGIN@6 which was called:
# once (11µs+9µs) by Regexp::Common::URI::file::BEGIN@5 at line 6 # spent 21µs making 1 call to Regexp::Common::URI::RFC1738::BEGIN@6
# spent 9µs making 1 call to warnings::import |
| 7 | |||||
| 8 | 2 | 33µs | 2 | 78µs | # spent 44µs (10+34) within Regexp::Common::URI::RFC1738::BEGIN@8 which was called:
# once (10µs+34µs) by Regexp::Common::URI::file::BEGIN@5 at line 8 # spent 44µs making 1 call to Regexp::Common::URI::RFC1738::BEGIN@8
# spent 34µs making 1 call to vars::import |
| 9 | 1 | 1µs | $VERSION = '2010010201'; | ||
| 10 | |||||
| 11 | 2 | 26µs | 2 | 204µs | # spent 107µs (10+97) within Regexp::Common::URI::RFC1738::BEGIN@11 which was called:
# once (10µs+97µs) by Regexp::Common::URI::file::BEGIN@5 at line 11 # spent 107µs making 1 call to Regexp::Common::URI::RFC1738::BEGIN@11
# spent 97µs making 1 call to vars::import |
| 12 | |||||
| 13 | 2 | 72µs | 1 | 6µs | # spent 6µs within Regexp::Common::URI::RFC1738::BEGIN@13 which was called:
# once (6µs+0s) by Regexp::Common::URI::file::BEGIN@5 at line 13 # spent 6µs making 1 call to Regexp::Common::URI::RFC1738::BEGIN@13 |
| 14 | 1 | 6µs | @ISA = qw /Exporter/; | ||
| 15 | |||||
| 16 | |||||
| 17 | 1 | 1µs | my %vars; | ||
| 18 | |||||
| 19 | # spent 13µs within Regexp::Common::URI::RFC1738::BEGIN@19 which was called:
# once (13µs+0s) by Regexp::Common::URI::file::BEGIN@5 at line 31 | ||||
| 20 | 1 | 4µs | $vars {low} = [qw /$digit $digits $hialpha $lowalpha $alpha $alphadigit | ||
| 21 | $safe $extra $national $punctuation $unreserved | ||||
| 22 | $unreserved_range $reserved $uchar $uchars $xchar | ||||
| 23 | $xchars $hex $escape/]; | ||||
| 24 | |||||
| 25 | 1 | 2µs | $vars {connect} = [qw /$port $hostnumber $toplabel $domainlabel $hostname | ||
| 26 | $host $hostport $user $password $login/]; | ||||
| 27 | |||||
| 28 | 1 | 7µs | $vars {parts} = [qw /$fsegment $fpath $group $article $grouppart | ||
| 29 | $search $database $wtype $wpath $psegment | ||||
| 30 | $fieldname $fieldvalue $fieldspec $ppath/]; | ||||
| 31 | 1 | 30µs | 1 | 13µs | } # spent 13µs making 1 call to Regexp::Common::URI::RFC1738::BEGIN@19 |
| 32 | |||||
| 33 | 2 | 366µs | 2 | 1.87ms | # spent 942µs (18+924) within Regexp::Common::URI::RFC1738::BEGIN@33 which was called:
# once (18µs+924µs) by Regexp::Common::URI::file::BEGIN@5 at line 33 # spent 942µs making 1 call to Regexp::Common::URI::RFC1738::BEGIN@33
# spent 924µs making 1 call to vars::import |
| 34 | |||||
| 35 | 1 | 1µs | @EXPORT = qw /$host/; | ||
| 36 | 1 | 18µs | @EXPORT_OK = map {@$_} values %vars; | ||
| 37 | 1 | 7µs | %EXPORT_TAGS = (%vars, ALL => [@EXPORT_OK]); | ||
| 38 | |||||
| 39 | # RFC 1738, base definitions. | ||||
| 40 | |||||
| 41 | # Lowlevel definitions. | ||||
| 42 | 1 | 800ns | $digit = '[0-9]'; | ||
| 43 | 1 | 800ns | $digits = '[0-9]+'; | ||
| 44 | 1 | 1µs | $hialpha = '[A-Z]'; | ||
| 45 | 1 | 1µs | $lowalpha = '[a-z]'; | ||
| 46 | 1 | 800ns | $alpha = '[a-zA-Z]'; # lowalpha | hialpha | ||
| 47 | 1 | 1µs | $alphadigit = '[a-zA-Z0-9]'; # alpha | digit | ||
| 48 | 1 | 1µs | $safe = '[-$_.+]'; | ||
| 49 | 1 | 1µs | $extra = "[!*'(),]"; | ||
| 50 | 1 | 1µs | $national = '[][{}|\\^~`]'; | ||
| 51 | 1 | 1µs | $punctuation = '[<>#%"]'; | ||
| 52 | 1 | 800ns | $unreserved_range = q [-a-zA-Z0-9$_.+!*'(),]; # alphadigit | safe | extra | ||
| 53 | 1 | 2µs | $unreserved = "[$unreserved_range]"; | ||
| 54 | 1 | 1µs | $reserved = '[;/?:@&=]'; | ||
| 55 | 1 | 1µs | $hex = '[a-fA-F0-9]'; | ||
| 56 | 1 | 2µs | $escape = "(?:%$hex$hex)"; | ||
| 57 | 1 | 2µs | $uchar = "(?:$unreserved|$escape)"; | ||
| 58 | 1 | 2µs | $uchars = "(?:(?:$unreserved|$escape)*)"; | ||
| 59 | 1 | 2µs | $xchar = "(?:[$unreserved_range;/?:\@&=]|$escape)"; | ||
| 60 | 1 | 2µs | $xchars = "(?:(?:[$unreserved_range;/?:\@&=]|$escape)*)"; | ||
| 61 | |||||
| 62 | # Connection related stuff. | ||||
| 63 | 1 | 1µs | $port = "(?:$digits)"; | ||
| 64 | 1 | 2µs | $hostnumber = "(?:$digits\[.]$digits\[.]$digits\[.]$digits)"; | ||
| 65 | 1 | 2µs | $toplabel = "(?:$alpha\[-a-zA-Z0-9]*$alphadigit|$alpha)"; | ||
| 66 | 1 | 2µs | $domainlabel = "(?:(?:$alphadigit\[-a-zA-Z0-9]*)?$alphadigit)"; | ||
| 67 | 1 | 2µs | $hostname = "(?:(?:$domainlabel\[.])*$toplabel)"; | ||
| 68 | 1 | 2µs | $host = "(?:$hostname|$hostnumber)"; | ||
| 69 | 1 | 1µs | $hostport = "(?:$host(?::$port)?)"; | ||
| 70 | |||||
| 71 | 1 | 2µs | $user = "(?:(?:[$unreserved_range;?&=]|$escape)*)"; | ||
| 72 | 1 | 2µs | $password = "(?:(?:[$unreserved_range;?&=]|$escape)*)"; | ||
| 73 | 1 | 2µs | $login = "(?:(?:$user(?::$password)?\@)?$hostport)"; | ||
| 74 | |||||
| 75 | # Parts (might require more if we add more URIs). | ||||
| 76 | |||||
| 77 | # FTP/file | ||||
| 78 | 1 | 2µs | $fsegment = "(?:(?:[$unreserved_range:\@&=]|$escape)*)"; | ||
| 79 | 1 | 2µs | $fpath = "(?:$fsegment(?:/$fsegment)*)"; | ||
| 80 | |||||
| 81 | # NNTP/news. | ||||
| 82 | 1 | 2µs | $group = "(?:$alpha\[-A-Za-z0-9.+_]*)"; | ||
| 83 | 1 | 2µs | $article = "(?:(?:[$unreserved_range;/?:&=]|$escape)+" . | ||
| 84 | '@' . "$host)"; | ||||
| 85 | 1 | 4µs | $grouppart = "(?:[*]|$article|$group)"; # It's important that | ||
| 86 | # $article goes before | ||||
| 87 | # $group. | ||||
| 88 | |||||
| 89 | # WAIS. | ||||
| 90 | 1 | 2µs | $search = "(?:(?:[$unreserved_range;:\@&=]|$escape)*)"; | ||
| 91 | 1 | 1µs | $database = $uchars; | ||
| 92 | 1 | 1µs | $wtype = $uchars; | ||
| 93 | 1 | 1µs | $wpath = $uchars; | ||
| 94 | |||||
| 95 | # prospero | ||||
| 96 | 1 | 2µs | $psegment = "(?:(?:[$unreserved_range?:\@&=]|$escape)*)"; | ||
| 97 | 1 | 2µs | $fieldname = "(?:(?:[$unreserved_range?:\@&]|$escape)*)"; | ||
| 98 | 1 | 2µs | $fieldvalue = "(?:(?:[$unreserved_range?:\@&]|$escape)*)"; | ||
| 99 | 1 | 2µs | $fieldspec = "(?:;$fieldname=$fieldvalue)"; | ||
| 100 | 1 | 2µs | $ppath = "(?:$psegment(?:/$psegment)*)"; | ||
| 101 | |||||
| 102 | # | ||||
| 103 | # The various '(?:(?:[$unreserved_range ...]|$escape)*)' above need | ||||
| 104 | # some loop unrolling to speed up the match. | ||||
| 105 | # | ||||
| 106 | |||||
| 107 | 1 | 35µs | 1; | ||
| 108 | |||||
| 109 | __END__ |