Filename | /home/hinrik/perl5/perlbrew/perls/perl-5.13.5/lib/site_perl/5.13.5/Regexp/Common/URI.pm |
Statements | Executed 76 statements in 820µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
13 | 13 | 12 | 84µs | 84µs | register_uri | Regexp::Common::URI::
1 | 1 | 1 | 26µs | 109µs | BEGIN@3 | Regexp::Common::URI::
1 | 1 | 1 | 12µs | 17µs | BEGIN@5 | Regexp::Common::URI::
1 | 1 | 1 | 12µs | 71µs | BEGIN@9 | Regexp::Common::URI::
1 | 1 | 1 | 11µs | 89µs | BEGIN@14 | Regexp::Common::URI::
1 | 1 | 1 | 11µs | 24µs | BEGIN@17 | Regexp::Common::URI::
1 | 1 | 1 | 10µs | 20µs | BEGIN@6 | Regexp::Common::URI::
1 | 1 | 1 | 10µs | 42µs | BEGIN@19 | Regexp::Common::URI::
1 | 1 | 1 | 10µs | 14µs | BEGIN@16 | Regexp::Common::URI::
1 | 1 | 1 | 6µs | 6µs | BEGIN@8 | Regexp::Common::URI::
0 | 0 | 0 | 0s | 0s | __ANON__[:42] | Regexp::Common::URI::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package Regexp::Common::URI; | ||||
2 | |||||
3 | 2 | 31µs | 2 | 109µs | # spent 109µs (26+84) within Regexp::Common::URI::BEGIN@3 which was called:
# once (26µs+84µs) by Regexp::Common::import at line 3 # spent 109µs making 1 call to Regexp::Common::URI::BEGIN@3
# spent 84µs making 1 call to Regexp::Common::import, recursion: max depth 1, sum of overlapping time 84µs |
4 | |||||
5 | 2 | 25µs | 2 | 22µs | # spent 17µs (12+5) within Regexp::Common::URI::BEGIN@5 which was called:
# once (12µs+5µs) by Regexp::Common::import at line 5 # spent 17µs making 1 call to Regexp::Common::URI::BEGIN@5
# spent 5µs making 1 call to strict::import |
6 | 2 | 24µs | 2 | 30µs | # spent 20µs (10+10) within Regexp::Common::URI::BEGIN@6 which was called:
# once (10µs+10µs) by Regexp::Common::import at line 6 # spent 20µs making 1 call to Regexp::Common::URI::BEGIN@6
# spent 10µs making 1 call to warnings::import |
7 | |||||
8 | 2 | 32µs | 1 | 6µs | # spent 6µs within Regexp::Common::URI::BEGIN@8 which was called:
# once (6µs+0s) by Regexp::Common::import at line 8 # spent 6µs making 1 call to Regexp::Common::URI::BEGIN@8 |
9 | 2 | 41µs | 2 | 131µs | # spent 71µs (12+60) within Regexp::Common::URI::BEGIN@9 which was called:
# once (12µs+60µs) by Regexp::Common::import at line 9 # spent 71µs making 1 call to Regexp::Common::URI::BEGIN@9
# spent 60µs making 1 call to vars::import |
10 | |||||
11 | 1 | 8µs | @ISA = qw /Exporter/; | ||
12 | 1 | 2µs | @EXPORT_OK = qw /register_uri/; | ||
13 | |||||
14 | 2 | 25µs | 2 | 89µs | # spent 89µs (11+78) within Regexp::Common::URI::BEGIN@14 which was called:
# once (11µs+78µs) by Regexp::Common::import at line 14 # spent 89µs making 1 call to Regexp::Common::URI::BEGIN@14
# spent 78µs making 1 call to Regexp::Common::import, recursion: max depth 1, sum of overlapping time 78µs |
15 | |||||
16 | 2 | 23µs | 2 | 19µs | # spent 14µs (10+5) within Regexp::Common::URI::BEGIN@16 which was called:
# once (10µs+5µs) by Regexp::Common::import at line 16 # spent 14µs making 1 call to Regexp::Common::URI::BEGIN@16
# spent 5µs making 1 call to strict::import |
17 | 2 | 26µs | 2 | 38µs | # spent 24µs (11+13) within Regexp::Common::URI::BEGIN@17 which was called:
# once (11µs+13µs) by Regexp::Common::import at line 17 # spent 24µs making 1 call to Regexp::Common::URI::BEGIN@17
# spent 13µs making 1 call to warnings::import |
18 | |||||
19 | 2 | 135µs | 2 | 75µs | # spent 42µs (10+32) within Regexp::Common::URI::BEGIN@19 which was called:
# once (10µs+32µs) by Regexp::Common::import at line 19 # spent 42µs making 1 call to Regexp::Common::URI::BEGIN@19
# spent 32µs making 1 call to vars::import |
20 | 1 | 1µs | $VERSION = '2010010201'; | ||
21 | |||||
22 | # Use 'require' here, not 'use', so we delay running them after we are compiled. | ||||
23 | # We also do it using an 'eval'; this saves us from have repeated similar | ||||
24 | # lines. The eval is further explained in 'perldoc -f require'. | ||||
25 | 1 | 3µs | my @uris = qw /fax file ftp gopher http pop prospero news tel telnet tv wais/; | ||
26 | 1 | 2µs | foreach my $uri (@uris) { | ||
27 | 24 | 313µs | eval "require Regexp::Common::URI::$uri"; # spent 130µs executing statements in string eval
# spent 125µs executing statements in string eval
# spent 112µs executing statements in string eval
# spent 108µs executing statements in string eval
# spent 108µs executing statements in string eval
# spent 108µs executing statements in string eval
# spent 105µs executing statements in string eval
# spent 105µs executing statements in string eval
# spent 104µs executing statements in string eval
# spent 104µs executing statements in string eval
# spent 103µs executing statements in string eval
# spent 102µs executing statements in string eval | ||
28 | die $@ if $@; | ||||
29 | } | ||||
30 | |||||
31 | 1 | 800ns | my %uris; | ||
32 | |||||
33 | # spent 84µs within Regexp::Common::URI::register_uri which was called 13 times, avg 6µs/call:
# once (11µs+0s) by Regexp::Common::import at line 25 of Regexp/Common/URI/ftp.pm
# once (10µs+0s) by Regexp::Common::import at line 19 of Regexp/Common/URI/fax.pm
# once (7µs+0s) by Regexp::Common::import at line 19 of Regexp/Common/URI/wais.pm
# once (6µs+0s) by Regexp::Common::import at line 19 of Regexp/Common/URI/prospero.pm
# once (6µs+0s) by Regexp::Common::import at line 19 of Regexp/Common/URI/tel.pm
# once (6µs+0s) by Regexp::Common::import at line 17 of Regexp/Common/URI/http.pm
# once (6µs+0s) by Regexp::Common::import at line 18 of Regexp/Common/URI/file.pm
# once (6µs+0s) by Regexp::Common::import at line 23 of Regexp/Common/URI/news.pm
# once (6µs+0s) by Regexp::Common::import at line 32 of Regexp/Common/URI/gopher.pm
# once (5µs+0s) by Regexp::Common::import at line 20 of Regexp/Common/URI/pop.pm
# once (5µs+0s) by Regexp::Common::import at line 22 of Regexp/Common/URI/news.pm
# once (5µs+0s) by Regexp::Common::import at line 17 of Regexp/Common/URI/telnet.pm
# once (5µs+0s) by Regexp::Common::import at line 20 of Regexp/Common/URI/tv.pm | ||||
34 | 26 | 109µs | my ($scheme, $uri) = @_; | ||
35 | $uris {$scheme} = $uri; | ||||
36 | } | ||||
37 | |||||
38 | pattern name => [qw (URI)], | ||||
39 | create => sub {my $uri = join '|' => values %uris; | ||||
40 | $uri =~ s/\(\?k:/(?:/g; | ||||
41 | "(?k:$uri)"; | ||||
42 | }, | ||||
43 | 1 | 7µs | 1 | 68µs | ; # spent 68µs making 1 call to Regexp::Common::pattern |
44 | |||||
45 | 1 | 12µs | 1; | ||
46 | |||||
47 | __END__ |