Filename | /usr/local/src/github.com/foswiki/core/lib/Foswiki/Form/Label.pm |
Statements | Executed 8 statements in 319µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 32µs | 43µs | BEGIN@4 | Foswiki::Form::Label::
1 | 1 | 1 | 20µs | 44µs | BEGIN@5 | Foswiki::Form::Label::
1 | 1 | 1 | 10µs | 10µs | BEGIN@7 | Foswiki::Form::Label::
0 | 0 | 0 | 0s | 0s | isEditable | Foswiki::Form::Label::
0 | 0 | 0 | 0s | 0s | renderForEdit | Foswiki::Form::Label::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | # See bottom of file for license and copyright information | ||||
2 | package Foswiki::Form::Label; | ||||
3 | |||||
4 | 2 | 56µs | 2 | 54µs | # spent 43µs (32+11) within Foswiki::Form::Label::BEGIN@4 which was called:
# once (32µs+11µs) by Foswiki::Form::createField at line 4 # spent 43µs making 1 call to Foswiki::Form::Label::BEGIN@4
# spent 11µs making 1 call to strict::import |
5 | 2 | 49µs | 2 | 69µs | # spent 44µs (20+24) within Foswiki::Form::Label::BEGIN@5 which was called:
# once (20µs+24µs) by Foswiki::Form::createField at line 5 # spent 44µs making 1 call to Foswiki::Form::Label::BEGIN@5
# spent 24µs making 1 call to warnings::import |
6 | |||||
7 | 2 | 197µs | 1 | 10µs | # spent 10µs within Foswiki::Form::Label::BEGIN@7 which was called:
# once (10µs+0s) by Foswiki::Form::createField at line 7 # spent 10µs making 1 call to Foswiki::Form::Label::BEGIN@7 |
8 | 1 | 11µs | our @ISA = ('Foswiki::Form::FieldDefinition'); | ||
9 | |||||
10 | sub isEditable { | ||||
11 | return 0; | ||||
12 | } | ||||
13 | |||||
14 | sub renderForEdit { | ||||
15 | my ( $this, $topicObject, $value ) = @_; | ||||
16 | |||||
17 | # Changing labels through the URL is a feature for Foswiki applications, | ||||
18 | # even though it's not accessible for standard edits. Some contribs | ||||
19 | # may want to override this to make labels editable. | ||||
20 | my $renderedValue = | ||||
21 | $topicObject->renderTML( $topicObject->expandMacros($value) ); | ||||
22 | return ( | ||||
23 | '', | ||||
24 | CGI::hidden( | ||||
25 | -name => $this->{name}, | ||||
26 | -value => $value | ||||
27 | ) | ||||
28 | . CGI::div( {}, $renderedValue ) | ||||
29 | ); | ||||
30 | } | ||||
31 | |||||
32 | 1 | 6µs | 1; | ||
33 | __END__ |