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 768µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 25µs | 108µs | BEGIN@3 | Regexp::Common::URI::RFC1738::
1 | 1 | 1 | 17µs | 936µs | BEGIN@33 | Regexp::Common::URI::RFC1738::
1 | 1 | 1 | 14µs | 14µs | BEGIN@19 | Regexp::Common::URI::RFC1738::
1 | 1 | 1 | 11µs | 16µs | BEGIN@5 | Regexp::Common::URI::RFC1738::
1 | 1 | 1 | 11µs | 20µs | BEGIN@6 | Regexp::Common::URI::RFC1738::
1 | 1 | 1 | 11µs | 45µs | BEGIN@8 | Regexp::Common::URI::RFC1738::
1 | 1 | 1 | 11µs | 109µs | BEGIN@11 | Regexp::Common::URI::RFC1738::
1 | 1 | 1 | 6µs | 6µs | BEGIN@13 | Regexp::Common::URI::RFC1738::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package Regexp::Common::URI::RFC1738; | ||||
2 | |||||
3 | 2 | 28µs | 2 | 108µs | # spent 108µs (25+82) within Regexp::Common::URI::RFC1738::BEGIN@3 which was called:
# once (25µs+82µs) by Regexp::Common::URI::file::BEGIN@5 at line 3 # spent 108µs making 1 call to Regexp::Common::URI::RFC1738::BEGIN@3
# spent 82µs making 1 call to Regexp::Common::import, recursion: max depth 1, sum of overlapping time 82µs |
4 | |||||
5 | 2 | 25µs | 2 | 20µs | # spent 16µs (11+5) within Regexp::Common::URI::RFC1738::BEGIN@5 which was called:
# once (11µs+5µ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 5µs making 1 call to strict::import |
6 | 2 | 27µs | 2 | 29µs | # spent 20µ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 20µs making 1 call to Regexp::Common::URI::RFC1738::BEGIN@6
# spent 9µs making 1 call to warnings::import |
7 | |||||
8 | 2 | 34µs | 2 | 79µs | # spent 45µs (11+34) within Regexp::Common::URI::RFC1738::BEGIN@8 which was called:
# once (11µs+34µs) by Regexp::Common::URI::file::BEGIN@5 at line 8 # spent 45µ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 | 207µs | # spent 109µs (11+98) within Regexp::Common::URI::RFC1738::BEGIN@11 which was called:
# once (11µs+98µs) by Regexp::Common::URI::file::BEGIN@5 at line 11 # spent 109µs making 1 call to Regexp::Common::URI::RFC1738::BEGIN@11
# spent 98µs making 1 call to vars::import |
12 | |||||
13 | 2 | 70µ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 14µs within Regexp::Common::URI::RFC1738::BEGIN@19 which was called:
# once (14µs+0s) by Regexp::Common::URI::file::BEGIN@5 at line 31 | ||||
20 | 3 | 14µ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 | $vars {connect} = [qw /$port $hostnumber $toplabel $domainlabel $hostname | ||||
26 | $host $hostport $user $password $login/]; | ||||
27 | |||||
28 | $vars {parts} = [qw /$fsegment $fpath $group $article $grouppart | ||||
29 | $search $database $wtype $wpath $psegment | ||||
30 | $fieldname $fieldvalue $fieldspec $ppath/]; | ||||
31 | 1 | 30µs | 1 | 14µs | } # spent 14µs making 1 call to Regexp::Common::URI::RFC1738::BEGIN@19 |
32 | |||||
33 | 2 | 372µs | 2 | 1.86ms | # spent 936µs (17+919) within Regexp::Common::URI::RFC1738::BEGIN@33 which was called:
# once (17µs+919µs) by Regexp::Common::URI::file::BEGIN@5 at line 33 # spent 936µs making 1 call to Regexp::Common::URI::RFC1738::BEGIN@33
# spent 919µs making 1 call to vars::import |
34 | |||||
35 | 1 | 2µs | @EXPORT = qw /$host/; | ||
36 | 1 | 22µs | @EXPORT_OK = map {@$_} values %vars; | ||
37 | 1 | 8µs | %EXPORT_TAGS = (%vars, ALL => [@EXPORT_OK]); | ||
38 | |||||
39 | # RFC 1738, base definitions. | ||||
40 | |||||
41 | # Lowlevel definitions. | ||||
42 | 1 | 900ns | $digit = '[0-9]'; | ||
43 | 1 | 900ns | $digits = '[0-9]+'; | ||
44 | 1 | 800ns | $hialpha = '[A-Z]'; | ||
45 | 1 | 800ns | $lowalpha = '[a-z]'; | ||
46 | 1 | 1µs | $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 | 1µs | $unreserved_range = q [-a-zA-Z0-9$_.+!*'(),]; # alphadigit | safe | extra | ||
53 | 1 | 2µs | $unreserved = "[$unreserved_range]"; | ||
54 | 1 | 700ns | $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 | 2µ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 | 1µs | $group = "(?:$alpha\[-A-Za-z0-9.+_]*)"; | ||
83 | 1 | 3µs | $article = "(?:(?:[$unreserved_range;/?:&=]|$escape)+" . | ||
84 | '@' . "$host)"; | ||||
85 | 1 | 2µ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 | 36µs | 1; | ||
108 | |||||
109 | __END__ |