Filename | /var/www/foswikidev/core/lib/Foswiki/Plugins/WysiwygPlugin/Constants.pm |
Statements | Executed 12 statements in 208µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 14µs | 27µs | BEGIN@19 | WC::
1 | 1 | 1 | 12µs | 33µs | BEGIN@23 | WC::
1 | 1 | 1 | 9µs | 47µs | BEGIN@22 | WC::
1 | 1 | 1 | 8µs | 13µs | BEGIN@20 | WC::
0 | 0 | 0 | 0s | 0s | test_reset | Foswiki::Plugins::WysiwygPlugin::Constants::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | # See bottom of file for license and copyright information | ||||
2 | package Foswiki::Plugins::WysiwygPlugin::Constants; | ||||
3 | |||||
4 | =pod | ||||
5 | |||||
6 | ---+ package Foswiki::Plugins::WysiwygPlugin::Constants a.k.a WC | ||||
7 | |||||
8 | Constants used throughout WysiwygPlugin | ||||
9 | |||||
10 | =cut | ||||
11 | |||||
12 | sub test_reset { | ||||
13 | $WC::encoding = undef; | ||||
14 | $WC::siteCharsetRepresentable = undef; | ||||
15 | } | ||||
16 | |||||
17 | package WC; # Short name | ||||
18 | |||||
19 | 2 | 35µs | 2 | 40µs | # spent 27µs (14+13) within WC::BEGIN@19 which was called:
# once (14µs+13µs) by Foswiki::Plugins::WysiwygPlugin::Handlers::BEGIN@16 at line 19 # spent 27µs making 1 call to WC::BEGIN@19
# spent 13µs making 1 call to strict::import |
20 | 2 | 24µs | 2 | 17µs | # spent 13µs (8+4) within WC::BEGIN@20 which was called:
# once (8µs+4µs) by Foswiki::Plugins::WysiwygPlugin::Handlers::BEGIN@16 at line 20 # spent 13µs making 1 call to WC::BEGIN@20
# spent 4µs making 1 call to warnings::import |
21 | |||||
22 | 2 | 25µs | 2 | 86µs | # spent 47µs (9+39) within WC::BEGIN@22 which was called:
# once (9µs+39µs) by Foswiki::Plugins::WysiwygPlugin::Handlers::BEGIN@16 at line 22 # spent 47µs making 1 call to WC::BEGIN@22
# spent 39µs making 1 call to Exporter::import |
23 | 2 | 115µs | 2 | 54µs | # spent 33µs (12+21) within WC::BEGIN@23 which was called:
# once (12µs+21µs) by Foswiki::Plugins::WysiwygPlugin::Handlers::BEGIN@16 at line 23 # spent 33µs making 1 call to WC::BEGIN@23
# spent 21µs making 1 call to Exporter::import |
24 | |||||
25 | =pod | ||||
26 | |||||
27 | ---++ REs | ||||
28 | REs for matching delimiters of wikiwords, must be consistent with TML2HTML.pm | ||||
29 | |||||
30 | | $STARTWW | Zero-width match for the start of a wikiword | | ||||
31 | | $ENDWW | Zero-width match for the end of a wikiword | | ||||
32 | | $PROTOCOL | match for a valid URL protocol e.g. http, mailto etc | | ||||
33 | |||||
34 | =cut | ||||
35 | |||||
36 | # STARTWW should match Foswiki::Render, execpt need to include protected whitespace spans. | ||||
37 | 1 | 5µs | our $STARTWW = | ||
38 | qr/^|(?<=[ \t\n\(])|(?<=<p>)|(?<=nbsp;<\/span>)|(?<=160;<\/span>)/om; | ||||
39 | 1 | 900ns | our $ENDWW = qr/$|(?=[ \t\n\,\.\;\:\!\?\)])|(?=<\/p>)|(?=<span\b[^>]*> )/om; | ||
40 | 1 | 700ns | our $PROTOCOL = qr/^(file|ftp|gopher|https?|irc|news|nntp|telnet|mailto):/; | ||
41 | |||||
42 | 1 | 3µs | 1; | ||
43 | __END__ |