Filename | /usr/lib/perl5/Template/Constants.pm |
Statements | Executed 125 statements in 2.22ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 50µs | 104µs | BEGIN@43 | Template::Constants::
1 | 1 | 1 | 28µs | 60µs | BEGIN@71 | Template::Constants::
1 | 1 | 1 | 18µs | 79µs | BEGIN@66 | Template::Constants::
1 | 1 | 1 | 17µs | 100µs | BEGIN@40 | Template::Constants::
1 | 1 | 1 | 17µs | 20µs | BEGIN@22 | Template::Constants::
1 | 1 | 1 | 15µs | 60µs | BEGIN@76 | Template::Constants::
1 | 1 | 1 | 13µs | 77µs | BEGIN@75 | Template::Constants::
1 | 1 | 1 | 13µs | 75µs | BEGIN@52 | Template::Constants::
1 | 1 | 1 | 13µs | 43µs | BEGIN@59 | Template::Constants::
1 | 1 | 1 | 12µs | 50µs | BEGIN@48 | Template::Constants::
1 | 1 | 1 | 12µs | 37µs | BEGIN@24 | Template::Constants::
1 | 1 | 1 | 11µs | 43µs | BEGIN@69 | Template::Constants::
1 | 1 | 1 | 11µs | 24µs | BEGIN@23 | Template::Constants::
1 | 1 | 1 | 11µs | 63µs | BEGIN@27 | Template::Constants::
1 | 1 | 1 | 11µs | 52µs | BEGIN@53 | Template::Constants::
1 | 1 | 1 | 11µs | 66µs | BEGIN@70 | Template::Constants::
1 | 1 | 1 | 10µs | 41µs | BEGIN@68 | Template::Constants::
1 | 1 | 1 | 10µs | 89µs | BEGIN@28 | Template::Constants::
1 | 1 | 1 | 10µs | 50µs | BEGIN@67 | Template::Constants::
1 | 1 | 1 | 10µs | 41µs | BEGIN@44 | Template::Constants::
1 | 1 | 1 | 10µs | 46µs | BEGIN@41 | Template::Constants::
1 | 1 | 1 | 10µs | 51µs | BEGIN@42 | Template::Constants::
1 | 1 | 1 | 10µs | 40µs | BEGIN@57 | Template::Constants::
1 | 1 | 1 | 9µs | 51µs | BEGIN@45 | Template::Constants::
1 | 1 | 1 | 9µs | 41µs | BEGIN@54 | Template::Constants::
1 | 1 | 1 | 9µs | 41µs | BEGIN@60 | Template::Constants::
1 | 1 | 1 | 9µs | 43µs | BEGIN@72 | Template::Constants::
1 | 1 | 1 | 9µs | 40µs | BEGIN@73 | Template::Constants::
1 | 1 | 1 | 9µs | 40µs | BEGIN@51 | Template::Constants::
1 | 1 | 1 | 9µs | 41µs | BEGIN@79 | Template::Constants::
1 | 1 | 1 | 9µs | 41µs | BEGIN@65 | Template::Constants::
1 | 1 | 1 | 8µs | 45µs | BEGIN@74 | Template::Constants::
1 | 1 | 1 | 8µs | 37µs | BEGIN@50 | Template::Constants::
1 | 1 | 1 | 8µs | 39µs | BEGIN@58 | Template::Constants::
1 | 1 | 1 | 8µs | 43µs | BEGIN@80 | Template::Constants::
1 | 1 | 1 | 8µs | 38µs | BEGIN@49 | Template::Constants::
1 | 1 | 1 | 8µs | 45µs | BEGIN@64 | Template::Constants::
1 | 1 | 1 | 8µs | 38µs | BEGIN@61 | Template::Constants::
3 | 2 | 2 | 6µs | 6µs | DEBUG_UNDEF (xsub) | Template::Constants::
2 | 1 | 1 | 5µs | 5µs | DEBUG_OFF (xsub) | Template::Constants::
2 | 1 | 1 | 2µs | 2µs | DEBUG_DIRS (xsub) | Template::Constants::
2 | 1 | 1 | 2µs | 2µs | DEBUG_ON (xsub) | Template::Constants::
2 | 1 | 1 | 2µs | 2µs | DEBUG_VARS (xsub) | Template::Constants::
2 | 1 | 1 | 1µs | 1µs | DEBUG_PLUGINS (xsub) | Template::Constants::
2 | 1 | 1 | 1µs | 1µs | DEBUG_CALLER (xsub) | Template::Constants::
2 | 1 | 1 | 1µs | 1µs | DEBUG_CONTEXT (xsub) | Template::Constants::
2 | 1 | 1 | 1µs | 1µs | DEBUG_FILTERS (xsub) | Template::Constants::
2 | 1 | 1 | 1µs | 1µs | DEBUG_PARSER (xsub) | Template::Constants::
2 | 1 | 1 | 1µs | 1µs | DEBUG_ALL (xsub) | Template::Constants::
2 | 1 | 1 | 1µs | 1µs | DEBUG_PROVIDER (xsub) | Template::Constants::
2 | 1 | 1 | 1µs | 1µs | DEBUG_SERVICE (xsub) | Template::Constants::
2 | 1 | 1 | 1µs | 1µs | DEBUG_STASH (xsub) | Template::Constants::
0 | 0 | 0 | 0s | 0s | debug_flags | Template::Constants::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | #============================================================= -*-Perl-*- | ||||
2 | # | ||||
3 | # Template::Constants.pm | ||||
4 | # | ||||
5 | # DESCRIPTION | ||||
6 | # Definition of constants for the Template Toolkit. | ||||
7 | # | ||||
8 | # AUTHOR | ||||
9 | # Andy Wardley <abw@wardley.org> | ||||
10 | # | ||||
11 | # COPYRIGHT | ||||
12 | # Copyright (C) 1996-2007 Andy Wardley. All Rights Reserved. | ||||
13 | # | ||||
14 | # This module is free software; you can redistribute it and/or | ||||
15 | # modify it under the same terms as Perl itself. | ||||
16 | # | ||||
17 | #============================================================================ | ||||
18 | |||||
19 | package Template::Constants; | ||||
20 | |||||
21 | 1 | 1µs | require Exporter; | ||
22 | 3 | 34µs | 2 | 24µs | # spent 20µs (17+4) within Template::Constants::BEGIN@22 which was called:
# once (17µs+4µs) by Template::Base::BEGIN@24 at line 22 # spent 20µs making 1 call to Template::Constants::BEGIN@22
# spent 4µs making 1 call to strict::import |
23 | 3 | 26µs | 2 | 36µs | # spent 24µs (11+12) within Template::Constants::BEGIN@23 which was called:
# once (11µs+12µs) by Template::Base::BEGIN@24 at line 23 # spent 24µs making 1 call to Template::Constants::BEGIN@23
# spent 12µs making 1 call to warnings::import |
24 | 3 | 34µs | 2 | 63µs | # spent 37µs (12+26) within Template::Constants::BEGIN@24 which was called:
# once (12µs+26µs) by Template::Base::BEGIN@24 at line 24 # spent 37µs making 1 call to Template::Constants::BEGIN@24
# spent 26µs making 1 call to Exporter::import |
25 | # Perl::MinimumVersion seems to think this is a Perl 5.008ism... | ||||
26 | # use base qw( Exporter ); | ||||
27 | 3 | 42µs | 2 | 115µs | # spent 63µs (11+52) within Template::Constants::BEGIN@27 which was called:
# once (11µs+52µs) by Template::Base::BEGIN@24 at line 27 # spent 63µs making 1 call to Template::Constants::BEGIN@27
# spent 52µs making 1 call to vars::import |
28 | 3 | 63µs | 2 | 168µs | # spent 89µs (10+79) within Template::Constants::BEGIN@28 which was called:
# once (10µs+79µs) by Template::Base::BEGIN@24 at line 28 # spent 89µs making 1 call to Template::Constants::BEGIN@28
# spent 79µs making 1 call to vars::import |
29 | # ... so we'll do it the Old Skool way just to keep it quiet | ||||
30 | 1 | 16µs | @ISA = qw( Exporter ); | ||
31 | |||||
32 | 1 | 800ns | our $VERSION = 2.75; | ||
33 | |||||
34 | |||||
35 | #======================================================================== | ||||
36 | # ----- EXPORTER ----- | ||||
37 | #======================================================================== | ||||
38 | |||||
39 | # STATUS constants returned by directives | ||||
40 | 3 | 44µs | 2 | 184µs | # spent 100µs (17+84) within Template::Constants::BEGIN@40 which was called:
# once (17µs+84µs) by Template::Base::BEGIN@24 at line 40 # spent 100µs making 1 call to Template::Constants::BEGIN@40
# spent 84µs making 1 call to constant::import |
41 | 3 | 32µs | 2 | 83µs | # spent 46µs (10+36) within Template::Constants::BEGIN@41 which was called:
# once (10µs+36µs) by Template::Base::BEGIN@24 at line 41 # spent 46µs making 1 call to Template::Constants::BEGIN@41
# spent 36µs making 1 call to constant::import |
42 | 3 | 79µs | 2 | 93µs | # spent 51µs (10+42) within Template::Constants::BEGIN@42 which was called:
# once (10µs+42µs) by Template::Base::BEGIN@24 at line 42 # spent 51µs making 1 call to Template::Constants::BEGIN@42
# spent 42µs making 1 call to constant::import |
43 | 3 | 37µs | 2 | 158µs | # spent 104µs (50+54) within Template::Constants::BEGIN@43 which was called:
# once (50µs+54µs) by Template::Base::BEGIN@24 at line 43 # spent 104µs making 1 call to Template::Constants::BEGIN@43
# spent 54µs making 1 call to constant::import |
44 | 3 | 28µs | 2 | 73µs | # spent 41µs (10+32) within Template::Constants::BEGIN@44 which was called:
# once (10µs+32µs) by Template::Base::BEGIN@24 at line 44 # spent 41µs making 1 call to Template::Constants::BEGIN@44
# spent 32µs making 1 call to constant::import |
45 | 3 | 73µs | 2 | 92µs | # spent 51µs (9+41) within Template::Constants::BEGIN@45 which was called:
# once (9µs+41µs) by Template::Base::BEGIN@24 at line 45 # spent 51µs making 1 call to Template::Constants::BEGIN@45
# spent 41µs making 1 call to constant::import |
46 | |||||
47 | # ERROR constants for indicating exception types | ||||
48 | 3 | 32µs | 2 | 88µs | # spent 50µs (12+38) within Template::Constants::BEGIN@48 which was called:
# once (12µs+38µs) by Template::Base::BEGIN@24 at line 48 # spent 50µs making 1 call to Template::Constants::BEGIN@48
# spent 38µs making 1 call to constant::import |
49 | 3 | 28µs | 2 | 67µs | # spent 38µs (8+30) within Template::Constants::BEGIN@49 which was called:
# once (8µs+30µs) by Template::Base::BEGIN@24 at line 49 # spent 38µs making 1 call to Template::Constants::BEGIN@49
# spent 30µs making 1 call to constant::import |
50 | 3 | 32µs | 2 | 66µs | # spent 37µs (8+29) within Template::Constants::BEGIN@50 which was called:
# once (8µs+29µs) by Template::Base::BEGIN@24 at line 50 # spent 37µs making 1 call to Template::Constants::BEGIN@50
# spent 29µs making 1 call to constant::import |
51 | 3 | 45µs | 2 | 71µs | # spent 40µs (9+31) within Template::Constants::BEGIN@51 which was called:
# once (9µs+31µs) by Template::Base::BEGIN@24 at line 51 # spent 40µs making 1 call to Template::Constants::BEGIN@51
# spent 31µs making 1 call to constant::import |
52 | 3 | 39µs | 2 | 137µs | # spent 75µs (13+62) within Template::Constants::BEGIN@52 which was called:
# once (13µs+62µs) by Template::Base::BEGIN@24 at line 52 # spent 75µs making 1 call to Template::Constants::BEGIN@52
# spent 62µs making 1 call to constant::import |
53 | 3 | 33µs | 2 | 93µs | # spent 52µs (11+41) within Template::Constants::BEGIN@53 which was called:
# once (11µs+41µs) by Template::Base::BEGIN@24 at line 53 # spent 52µs making 1 call to Template::Constants::BEGIN@53
# spent 41µs making 1 call to constant::import |
54 | 3 | 32µs | 2 | 72µs | # spent 41µs (9+31) within Template::Constants::BEGIN@54 which was called:
# once (9µs+31µs) by Template::Base::BEGIN@24 at line 54 # spent 41µs making 1 call to Template::Constants::BEGIN@54
# spent 31µs making 1 call to constant::import |
55 | |||||
56 | # CHOMP constants for PRE_CHOMP and POST_CHOMP | ||||
57 | 3 | 28µs | 2 | 70µs | # spent 40µs (10+30) within Template::Constants::BEGIN@57 which was called:
# once (10µs+30µs) by Template::Base::BEGIN@24 at line 57 # spent 40µs making 1 call to Template::Constants::BEGIN@57
# spent 31µs making 1 call to constant::import |
58 | 3 | 29µs | 2 | 70µs | # spent 39µs (8+31) within Template::Constants::BEGIN@58 which was called:
# once (8µs+31µs) by Template::Base::BEGIN@24 at line 58 # spent 39µs making 1 call to Template::Constants::BEGIN@58
# spent 31µs making 1 call to constant::import |
59 | 3 | 31µs | 2 | 74µs | # spent 43µs (13+31) within Template::Constants::BEGIN@59 which was called:
# once (13µs+31µs) by Template::Base::BEGIN@24 at line 59 # spent 43µs making 1 call to Template::Constants::BEGIN@59
# spent 31µs making 1 call to constant::import |
60 | 3 | 28µs | 2 | 72µs | # spent 41µs (9+32) within Template::Constants::BEGIN@60 which was called:
# once (9µs+32µs) by Template::Base::BEGIN@24 at line 60 # spent 41µs making 1 call to Template::Constants::BEGIN@60
# spent 32µs making 1 call to constant::import |
61 | 3 | 32µs | 2 | 68µs | # spent 38µs (8+30) within Template::Constants::BEGIN@61 which was called:
# once (8µs+30µs) by Template::Base::BEGIN@24 at line 61 # spent 38µs making 1 call to Template::Constants::BEGIN@61
# spent 30µs making 1 call to constant::import |
62 | |||||
63 | # DEBUG constants to enable various debugging options | ||||
64 | 3 | 30µs | 2 | 83µs | # spent 45µs (8+37) within Template::Constants::BEGIN@64 which was called:
# once (8µs+37µs) by Template::Base::BEGIN@24 at line 64 # spent 45µs making 1 call to Template::Constants::BEGIN@64
# spent 37µs making 1 call to constant::import |
65 | 3 | 36µs | 2 | 73µs | # spent 41µs (9+32) within Template::Constants::BEGIN@65 which was called:
# once (9µs+32µs) by Template::Base::BEGIN@24 at line 65 # spent 41µs making 1 call to Template::Constants::BEGIN@65
# spent 32µs making 1 call to constant::import |
66 | 3 | 56µs | 2 | 140µs | # spent 79µs (18+61) within Template::Constants::BEGIN@66 which was called:
# once (18µs+61µs) by Template::Base::BEGIN@24 at line 66 # spent 79µs making 1 call to Template::Constants::BEGIN@66
# spent 61µs making 1 call to constant::import |
67 | 3 | 35µs | 2 | 90µs | # spent 50µs (10+40) within Template::Constants::BEGIN@67 which was called:
# once (10µs+40µs) by Template::Base::BEGIN@24 at line 67 # spent 50µs making 1 call to Template::Constants::BEGIN@67
# spent 40µs making 1 call to constant::import |
68 | 3 | 30µs | 2 | 72µs | # spent 41µs (10+31) within Template::Constants::BEGIN@68 which was called:
# once (10µs+31µs) by Template::Base::BEGIN@24 at line 68 # spent 41µs making 1 call to Template::Constants::BEGIN@68
# spent 31µs making 1 call to constant::import |
69 | 3 | 48µs | 2 | 75µs | # spent 43µs (11+32) within Template::Constants::BEGIN@69 which was called:
# once (11µs+32µs) by Template::Base::BEGIN@24 at line 69 # spent 43µs making 1 call to Template::Constants::BEGIN@69
# spent 32µs making 1 call to constant::import |
70 | 3 | 36µs | 2 | 120µs | # spent 66µs (11+55) within Template::Constants::BEGIN@70 which was called:
# once (11µs+55µs) by Template::Base::BEGIN@24 at line 70 # spent 66µs making 1 call to Template::Constants::BEGIN@70
# spent 55µs making 1 call to constant::import |
71 | 3 | 35µs | 2 | 93µs | # spent 60µs (28+33) within Template::Constants::BEGIN@71 which was called:
# once (28µs+33µs) by Template::Base::BEGIN@24 at line 71 # spent 60µs making 1 call to Template::Constants::BEGIN@71
# spent 33µs making 1 call to constant::import |
72 | 3 | 31µs | 2 | 76µs | # spent 43µs (9+34) within Template::Constants::BEGIN@72 which was called:
# once (9µs+34µs) by Template::Base::BEGIN@24 at line 72 # spent 43µs making 1 call to Template::Constants::BEGIN@72
# spent 34µs making 1 call to constant::import |
73 | 3 | 29µs | 2 | 70µs | # spent 40µs (9+30) within Template::Constants::BEGIN@73 which was called:
# once (9µs+30µs) by Template::Base::BEGIN@24 at line 73 # spent 40µs making 1 call to Template::Constants::BEGIN@73
# spent 30µs making 1 call to constant::import |
74 | 3 | 34µs | 2 | 82µs | # spent 45µs (8+37) within Template::Constants::BEGIN@74 which was called:
# once (8µs+37µs) by Template::Base::BEGIN@24 at line 74 # spent 45µs making 1 call to Template::Constants::BEGIN@74
# spent 37µs making 1 call to constant::import |
75 | 3 | 58µs | 2 | 140µs | # spent 77µs (13+63) within Template::Constants::BEGIN@75 which was called:
# once (13µs+63µs) by Template::Base::BEGIN@24 at line 75 # spent 77µs making 1 call to Template::Constants::BEGIN@75
# spent 63µs making 1 call to constant::import |
76 | 3 | 39µs | 2 | 105µs | # spent 60µs (15+45) within Template::Constants::BEGIN@76 which was called:
# once (15µs+45µs) by Template::Base::BEGIN@24 at line 76 # spent 60µs making 1 call to Template::Constants::BEGIN@76
# spent 45µs making 1 call to constant::import |
77 | |||||
78 | # extra debugging flags | ||||
79 | 3 | 34µs | 2 | 73µs | # spent 41µs (9+32) within Template::Constants::BEGIN@79 which was called:
# once (9µs+32µs) by Template::Base::BEGIN@24 at line 79 # spent 41µs making 1 call to Template::Constants::BEGIN@79
# spent 32µs making 1 call to constant::import |
80 | 3 | 585µs | 2 | 78µs | # spent 43µs (8+35) within Template::Constants::BEGIN@80 which was called:
# once (8µs+35µs) by Template::Base::BEGIN@24 at line 80 # spent 43µs making 1 call to Template::Constants::BEGIN@80
# spent 35µs making 1 call to constant::import |
81 | |||||
82 | 1 | 156µs | 28 | 25µs | $DEBUG_OPTIONS = { # spent 5µs making 2 calls to Template::Constants::DEBUG_OFF, avg 3µs/call
# spent 3µs making 2 calls to Template::Constants::DEBUG_UNDEF, avg 2µs/call
# spent 2µs making 2 calls to Template::Constants::DEBUG_DIRS, avg 1µs/call
# spent 2µs making 2 calls to Template::Constants::DEBUG_ON, avg 1µs/call
# spent 2µs making 2 calls to Template::Constants::DEBUG_VARS, avg 1µs/call
# spent 1µs making 2 calls to Template::Constants::DEBUG_PLUGINS, avg 600ns/call
# spent 1µs making 2 calls to Template::Constants::DEBUG_CALLER, avg 550ns/call
# spent 1µs making 2 calls to Template::Constants::DEBUG_CONTEXT, avg 550ns/call
# spent 1µs making 2 calls to Template::Constants::DEBUG_FILTERS, avg 550ns/call
# spent 1µs making 2 calls to Template::Constants::DEBUG_PARSER, avg 550ns/call
# spent 1µs making 2 calls to Template::Constants::DEBUG_ALL, avg 500ns/call
# spent 1µs making 2 calls to Template::Constants::DEBUG_PROVIDER, avg 500ns/call
# spent 1µs making 2 calls to Template::Constants::DEBUG_SERVICE, avg 500ns/call
# spent 1µs making 2 calls to Template::Constants::DEBUG_STASH, avg 500ns/call |
83 | &DEBUG_OFF => off => off => &DEBUG_OFF, | ||||
84 | &DEBUG_ON => on => on => &DEBUG_ON, | ||||
85 | &DEBUG_UNDEF => undef => undef => &DEBUG_UNDEF, | ||||
86 | &DEBUG_VARS => vars => vars => &DEBUG_VARS, | ||||
87 | &DEBUG_DIRS => dirs => dirs => &DEBUG_DIRS, | ||||
88 | &DEBUG_STASH => stash => stash => &DEBUG_STASH, | ||||
89 | &DEBUG_CONTEXT => context => context => &DEBUG_CONTEXT, | ||||
90 | &DEBUG_PARSER => parser => parser => &DEBUG_PARSER, | ||||
91 | &DEBUG_PROVIDER => provider => provider => &DEBUG_PROVIDER, | ||||
92 | &DEBUG_PLUGINS => plugins => plugins => &DEBUG_PLUGINS, | ||||
93 | &DEBUG_FILTERS => filters => filters => &DEBUG_FILTERS, | ||||
94 | &DEBUG_SERVICE => service => service => &DEBUG_SERVICE, | ||||
95 | &DEBUG_ALL => all => all => &DEBUG_ALL, | ||||
96 | &DEBUG_CALLER => caller => caller => &DEBUG_CALLER, | ||||
97 | }; | ||||
98 | |||||
99 | 1 | 2µs | @STATUS = qw( STATUS_OK STATUS_RETURN STATUS_STOP STATUS_DONE | ||
100 | STATUS_DECLINED STATUS_ERROR ); | ||||
101 | 1 | 1µs | @ERROR = qw( ERROR_FILE ERROR_VIEW ERROR_UNDEF ERROR_PERL | ||
102 | ERROR_RETURN ERROR_FILTER ERROR_PLUGIN ); | ||||
103 | 1 | 1µs | @CHOMP = qw( CHOMP_NONE CHOMP_ALL CHOMP_ONE CHOMP_COLLAPSE CHOMP_GREEDY ); | ||
104 | 1 | 5µs | @DEBUG = qw( DEBUG_OFF DEBUG_ON DEBUG_UNDEF DEBUG_VARS | ||
105 | DEBUG_DIRS DEBUG_STASH DEBUG_CONTEXT DEBUG_PARSER | ||||
106 | DEBUG_PROVIDER DEBUG_PLUGINS DEBUG_FILTERS DEBUG_SERVICE | ||||
107 | DEBUG_ALL DEBUG_CALLER DEBUG_FLAGS ); | ||||
108 | |||||
109 | 1 | 4µs | @EXPORT_OK = ( @STATUS, @ERROR, @CHOMP, @DEBUG ); | ||
110 | 1 | 13µs | %EXPORT_TAGS = ( | ||
111 | 'all' => [ @EXPORT_OK ], | ||||
112 | 'status' => [ @STATUS ], | ||||
113 | 'error' => [ @ERROR ], | ||||
114 | 'chomp' => [ @CHOMP ], | ||||
115 | 'debug' => [ @DEBUG ], | ||||
116 | ); | ||||
117 | |||||
118 | |||||
119 | sub debug_flags { | ||||
120 | my ($self, $debug) = @_; | ||||
121 | my (@flags, $flag, $value); | ||||
122 | $debug = $self unless defined($debug) || ref($self); | ||||
123 | |||||
124 | if ($debug =~ /^\d+$/) { | ||||
125 | foreach $flag (@DEBUG) { | ||||
126 | next if $flag =~ /^DEBUG_(OFF|ALL|FLAGS)$/; | ||||
127 | |||||
128 | # don't trash the original | ||||
129 | my $copy = $flag; | ||||
130 | $flag =~ s/^DEBUG_//; | ||||
131 | $flag = lc $flag; | ||||
132 | return $self->error("no value for flag: $flag") | ||||
133 | unless defined($value = $DEBUG_OPTIONS->{ $flag }); | ||||
134 | $flag = $value; | ||||
135 | |||||
136 | if ($debug & $flag) { | ||||
137 | $value = $DEBUG_OPTIONS->{ $flag }; | ||||
138 | return $self->error("no value for flag: $flag") unless defined $value; | ||||
139 | push(@flags, $value); | ||||
140 | } | ||||
141 | } | ||||
142 | return wantarray ? @flags : join(', ', @flags); | ||||
143 | } | ||||
144 | else { | ||||
145 | @flags = split(/\W+/, $debug); | ||||
146 | $debug = 0; | ||||
147 | foreach $flag (@flags) { | ||||
148 | $value = $DEBUG_OPTIONS->{ $flag }; | ||||
149 | return $self->error("unknown debug flag: $flag") unless defined $value; | ||||
150 | $debug |= $value; | ||||
151 | } | ||||
152 | return $debug; | ||||
153 | } | ||||
154 | } | ||||
155 | |||||
156 | |||||
157 | 1 | 23µs | 1; | ||
158 | |||||
159 | __END__ | ||||
# spent 1µs within Template::Constants::DEBUG_ALL which was called 2 times, avg 500ns/call:
# 2 times (1µs+0s) by Template::Base::BEGIN@24 at line 82, avg 500ns/call | |||||
# spent 1µs within Template::Constants::DEBUG_CALLER which was called 2 times, avg 550ns/call:
# 2 times (1µs+0s) by Template::Base::BEGIN@24 at line 82, avg 550ns/call | |||||
# spent 1µs within Template::Constants::DEBUG_CONTEXT which was called 2 times, avg 550ns/call:
# 2 times (1µs+0s) by Template::Base::BEGIN@24 at line 82, avg 550ns/call | |||||
# spent 2µs within Template::Constants::DEBUG_DIRS which was called 2 times, avg 1µs/call:
# 2 times (2µs+0s) by Template::Base::BEGIN@24 at line 82, avg 1µs/call | |||||
# spent 1µs within Template::Constants::DEBUG_FILTERS which was called 2 times, avg 550ns/call:
# 2 times (1µs+0s) by Template::Base::BEGIN@24 at line 82, avg 550ns/call | |||||
# spent 5µs within Template::Constants::DEBUG_OFF which was called 2 times, avg 3µs/call:
# 2 times (5µs+0s) by Template::Base::BEGIN@24 at line 82, avg 3µs/call | |||||
# spent 2µs within Template::Constants::DEBUG_ON which was called 2 times, avg 1µs/call:
# 2 times (2µs+0s) by Template::Base::BEGIN@24 at line 82, avg 1µs/call | |||||
# spent 1µs within Template::Constants::DEBUG_PARSER which was called 2 times, avg 550ns/call:
# 2 times (1µs+0s) by Template::Base::BEGIN@24 at line 82, avg 550ns/call | |||||
# spent 1µs within Template::Constants::DEBUG_PLUGINS which was called 2 times, avg 600ns/call:
# 2 times (1µs+0s) by Template::Base::BEGIN@24 at line 82, avg 600ns/call | |||||
# spent 1µs within Template::Constants::DEBUG_PROVIDER which was called 2 times, avg 500ns/call:
# 2 times (1µs+0s) by Template::Base::BEGIN@24 at line 82, avg 500ns/call | |||||
# spent 1µs within Template::Constants::DEBUG_SERVICE which was called 2 times, avg 500ns/call:
# 2 times (1µs+0s) by Template::Base::BEGIN@24 at line 82, avg 500ns/call | |||||
# spent 1µs within Template::Constants::DEBUG_STASH which was called 2 times, avg 500ns/call:
# 2 times (1µs+0s) by Template::Base::BEGIN@24 at line 82, avg 500ns/call | |||||
# spent 6µs within Template::Constants::DEBUG_UNDEF which was called 3 times, avg 2µs/call:
# 2 times (3µs+0s) by Template::Base::BEGIN@24 at line 82, avg 2µs/call
# once (3µs+0s) by Template::Context::_init at line 860 of Template/Context.pm | |||||
# spent 2µs within Template::Constants::DEBUG_VARS which was called 2 times, avg 1µs/call:
# 2 times (2µs+0s) by Template::Base::BEGIN@24 at line 82, avg 1µs/call |