Filename | /usr/local/src/github.com/foswiki/core/lib/Foswiki/Plugins/JQueryPlugin/FOSWIKI.pm |
Statements | Executed 38 statements in 987µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 1.37ms | 1.64ms | BEGIN@7 | Foswiki::Plugins::JQueryPlugin::FOSWIKI::
1 | 1 | 1 | 118µs | 1.64ms | init | Foswiki::Plugins::JQueryPlugin::FOSWIKI::
1 | 1 | 1 | 38µs | 108µs | new | Foswiki::Plugins::JQueryPlugin::FOSWIKI::
1 | 1 | 1 | 32µs | 41µs | BEGIN@3 | Foswiki::Plugins::JQueryPlugin::FOSWIKI::
1 | 1 | 1 | 24µs | 46µs | BEGIN@4 | Foswiki::Plugins::JQueryPlugin::FOSWIKI::
1 | 1 | 1 | 22µs | 22µs | BEGIN@6 | Foswiki::Plugins::JQueryPlugin::FOSWIKI::
1 | 1 | 1 | 17µs | 17µs | BEGIN@5 | Foswiki::Plugins::JQueryPlugin::FOSWIKI::
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::JQueryPlugin::FOSWIKI; | ||||
3 | 2 | 50µs | 2 | 50µs | # spent 41µs (32+9) within Foswiki::Plugins::JQueryPlugin::FOSWIKI::BEGIN@3 which was called:
# once (32µs+9µs) by Foswiki::Plugins::JQueryPlugin::Plugins::BEGIN@1 at line 3 # spent 41µs making 1 call to Foswiki::Plugins::JQueryPlugin::FOSWIKI::BEGIN@3
# spent 9µs making 1 call to strict::import |
4 | 2 | 49µs | 2 | 68µs | # spent 46µs (24+22) within Foswiki::Plugins::JQueryPlugin::FOSWIKI::BEGIN@4 which was called:
# once (24µs+22µs) by Foswiki::Plugins::JQueryPlugin::Plugins::BEGIN@1 at line 4 # spent 46µs making 1 call to Foswiki::Plugins::JQueryPlugin::FOSWIKI::BEGIN@4
# spent 22µs making 1 call to warnings::import |
5 | 2 | 48µs | 1 | 17µs | # spent 17µs within Foswiki::Plugins::JQueryPlugin::FOSWIKI::BEGIN@5 which was called:
# once (17µs+0s) by Foswiki::Plugins::JQueryPlugin::Plugins::BEGIN@1 at line 5 # spent 17µs making 1 call to Foswiki::Plugins::JQueryPlugin::FOSWIKI::BEGIN@5 |
6 | 2 | 54µs | 1 | 22µs | # spent 22µs within Foswiki::Plugins::JQueryPlugin::FOSWIKI::BEGIN@6 which was called:
# once (22µs+0s) by Foswiki::Plugins::JQueryPlugin::Plugins::BEGIN@1 at line 6 # spent 22µs making 1 call to Foswiki::Plugins::JQueryPlugin::FOSWIKI::BEGIN@6 |
7 | 2 | 617µs | 1 | 1.64ms | # spent 1.64ms (1.37+271µs) within Foswiki::Plugins::JQueryPlugin::FOSWIKI::BEGIN@7 which was called:
# once (1.37ms+271µs) by Foswiki::Plugins::JQueryPlugin::Plugins::BEGIN@1 at line 7 # spent 1.64ms making 1 call to Foswiki::Plugins::JQueryPlugin::FOSWIKI::BEGIN@7 |
8 | 1 | 15µs | our @ISA = qw( Foswiki::Plugins::JQueryPlugin::Plugin ); | ||
9 | |||||
10 | =begin TML | ||||
11 | |||||
12 | ---+ package Foswiki::Plugins::JQueryPlugin::FOSWIKI | ||||
13 | |||||
14 | This is the perl stub for the jquery.foswiki plugin. | ||||
15 | |||||
16 | =cut | ||||
17 | |||||
18 | =begin TML | ||||
19 | |||||
20 | ---++ ClassMethod new( $class, ... ) | ||||
21 | |||||
22 | Constructor | ||||
23 | |||||
24 | =cut | ||||
25 | |||||
26 | # spent 108µs (38+70) within Foswiki::Plugins::JQueryPlugin::FOSWIKI::new which was called:
# once (38µs+70µs) by Foswiki::Plugins::JQueryPlugin::Plugins::load at line 216 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Plugins/JQueryPlugin/Plugins.pm | ||||
27 | 3 | 37µs | my $class = shift; | ||
28 | |||||
29 | 1 | 70µs | my $this = bless( # spent 70µs making 1 call to Foswiki::Plugins::JQueryPlugin::Plugin::new | ||
30 | $class->SUPER::new( | ||||
31 | name => 'Foswiki', | ||||
32 | version => '2.01', | ||||
33 | author => 'Michael Daum', | ||||
34 | homepage => 'http://foswiki.org/Extensions/JQueryPlugin', | ||||
35 | javascript => ['jquery.foswiki.js'], | ||||
36 | dependencies => [ 'JQUERYPLUGIN', 'livequery' ], | ||||
37 | tags => 'JQTHEME, JQREQUIRE, JQICON, JQICONPATH, JQPLUGINS', | ||||
38 | ), | ||||
39 | $class | ||||
40 | ); | ||||
41 | |||||
42 | return $this; | ||||
43 | } | ||||
44 | |||||
45 | =begin TML | ||||
46 | |||||
47 | ---++ ClassMethod init( $this ) | ||||
48 | |||||
49 | Initialize this plugin by adding the required static files to the html header | ||||
50 | |||||
51 | =cut | ||||
52 | |||||
53 | # spent 1.64ms (118µs+1.52) within Foswiki::Plugins::JQueryPlugin::FOSWIKI::init which was called:
# once (118µs+1.52ms) by Foswiki::Plugins::JQueryPlugin::Plugins::createPlugin at line 84 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Plugins/JQueryPlugin/Plugins.pm | ||||
54 | 23 | 111µs | my $this = shift; | ||
55 | |||||
56 | 1 | 1.14ms | return unless $this->SUPER::init(); # spent 1.14ms making 1 call to Foswiki::Plugins::JQueryPlugin::Plugin::init | ||
57 | |||||
58 | # get exported prefs | ||||
59 | 1 | 190µs | my $prefs = Foswiki::Func::getPreferencesValue('EXPORTEDPREFERENCES') || ''; # spent 190µs making 1 call to Foswiki::Func::getPreferencesValue | ||
60 | |||||
61 | # try a little harder for foswiki engines < 1.1 | ||||
62 | if ( $Foswiki::Plugins::VERSION < 2.1 ) { | ||||
63 | |||||
64 | # defaults since foswiki >= 1.1.0 | ||||
65 | $prefs = | ||||
66 | 'PUBURL, PUBURLPATH, SCRIPTSUFFIX, SCRIPTURL, SCRIPTURLPATH, SERVERTIME, SKIN, SYSTEMWEB, TOPIC, USERNAME, USERSWEB, WEB, WIKINAME, WIKIUSERNAME, NAMEFILTER'; | ||||
67 | $prefs .= ', TWISTYANIMATIONSPEED' | ||||
68 | if $Foswiki::cfg{Plugins}{TwistyPlugin} | ||||
69 | {Enabled}; # can't use context during init | ||||
70 | } | ||||
71 | |||||
72 | # init NAMEFILTER | ||||
73 | 1 | 130µs | unless ( Foswiki::Func::getPreferencesValue('NAMEFILTER') ) { # spent 130µs making 1 call to Foswiki::Func::getPreferencesValue | ||
74 | Foswiki::Func::setPreferencesValue( 'NAMEFILTER', | ||||
75 | $Foswiki::cfg{NameFilter} ); | ||||
76 | } | ||||
77 | |||||
78 | # add exported preferences to head | ||||
79 | my $text = ''; | ||||
80 | foreach my $pref ( split( /\s*,\s*/, $prefs ) ) { | ||||
81 | $text .= | ||||
82 | '<meta name="foswiki.' | ||||
83 | . $pref | ||||
84 | . '" content="%ENCODE{"%' | ||||
85 | . $pref | ||||
86 | . '%"}%" />' | ||||
87 | . " <!-- $pref -->\n"; | ||||
88 | } | ||||
89 | |||||
90 | 1 | 59µs | Foswiki::Func::addToZone( "head", "JQUERYPLUGIN::FOSWIKI::META", $text ); # spent 59µs making 1 call to Foswiki::Func::addToZone | ||
91 | } | ||||
92 | |||||
93 | 1 | 6µs | 1; | ||
94 | __END__ |