← Index
NYTProf Performance Profile   « line view »
For ./view
  Run on Fri Jul 31 18:42:36 2015
Reported on Fri Jul 31 18:48:15 2015

Filename/var/www/foswikidev/core/lib/Foswiki/Plugins/WysiwygPlugin/Constants.pm
StatementsExecuted 12 statements in 208µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11114µs27µsWC::::BEGIN@19 WC::BEGIN@19
11112µs33µsWC::::BEGIN@23 WC::BEGIN@23
1119µs47µsWC::::BEGIN@22 WC::BEGIN@22
1118µs13µsWC::::BEGIN@20 WC::BEGIN@20
0000s0sFoswiki::Plugins::WysiwygPlugin::Constants::::test_resetFoswiki::Plugins::WysiwygPlugin::Constants::test_reset
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1# See bottom of file for license and copyright information
2package Foswiki::Plugins::WysiwygPlugin::Constants;
3
4=pod
5
6---+ package Foswiki::Plugins::WysiwygPlugin::Constants a.k.a WC
7
8Constants used throughout WysiwygPlugin
9
10=cut
11
12sub test_reset {
13 $WC::encoding = undef;
14 $WC::siteCharsetRepresentable = undef;
15}
16
17package WC; # Short name
18
19235µs240µ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
use strict;
# spent 27µs making 1 call to WC::BEGIN@19 # spent 13µs making 1 call to strict::import
20224µs217µ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
use warnings;
# spent 13µs making 1 call to WC::BEGIN@20 # spent 4µs making 1 call to warnings::import
21
22225µs286µ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
use Encode;
# spent 47µs making 1 call to WC::BEGIN@22 # spent 39µs making 1 call to Exporter::import
232115µs254µ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
use HTML::Entities;
# 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
28REs 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.
3715µsour $STARTWW =
38 qr/^|(?<=[ \t\n\(])|(?<=<p>)|(?<=nbsp;<\/span>)|(?<=160;<\/span>)/om;
391900nsour $ENDWW = qr/$|(?=[ \t\n\,\.\;\:\!\?\)])|(?=<\/p>)|(?=<span\b[^>]*> )/om;
401700nsour $PROTOCOL = qr/^(file|ftp|gopher|https?|irc|news|nntp|telnet|mailto):/;
41
4213µs1;
43__END__