← Index
NYTProf Performance Profile   « block view • line view • sub view »
For /usr/share/koha/opac/cgi-bin/opac/opac-search.pl
  Run on Tue Oct 15 17:10:45 2013
Reported on Tue Oct 15 17:11:22 2013

Filename/usr/lib/perl5/Template/Constants.pm
StatementsExecuted 125 statements in 2.22ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11150µs104µsTemplate::Constants::::BEGIN@43Template::Constants::BEGIN@43
11128µs60µsTemplate::Constants::::BEGIN@71Template::Constants::BEGIN@71
11118µs79µsTemplate::Constants::::BEGIN@66Template::Constants::BEGIN@66
11117µs100µsTemplate::Constants::::BEGIN@40Template::Constants::BEGIN@40
11117µs20µsTemplate::Constants::::BEGIN@22Template::Constants::BEGIN@22
11115µs60µsTemplate::Constants::::BEGIN@76Template::Constants::BEGIN@76
11113µs77µsTemplate::Constants::::BEGIN@75Template::Constants::BEGIN@75
11113µs75µsTemplate::Constants::::BEGIN@52Template::Constants::BEGIN@52
11113µs43µsTemplate::Constants::::BEGIN@59Template::Constants::BEGIN@59
11112µs50µsTemplate::Constants::::BEGIN@48Template::Constants::BEGIN@48
11112µs37µsTemplate::Constants::::BEGIN@24Template::Constants::BEGIN@24
11111µs43µsTemplate::Constants::::BEGIN@69Template::Constants::BEGIN@69
11111µs24µsTemplate::Constants::::BEGIN@23Template::Constants::BEGIN@23
11111µs63µsTemplate::Constants::::BEGIN@27Template::Constants::BEGIN@27
11111µs52µsTemplate::Constants::::BEGIN@53Template::Constants::BEGIN@53
11111µs66µsTemplate::Constants::::BEGIN@70Template::Constants::BEGIN@70
11110µs41µsTemplate::Constants::::BEGIN@68Template::Constants::BEGIN@68
11110µs89µsTemplate::Constants::::BEGIN@28Template::Constants::BEGIN@28
11110µs50µsTemplate::Constants::::BEGIN@67Template::Constants::BEGIN@67
11110µs41µsTemplate::Constants::::BEGIN@44Template::Constants::BEGIN@44
11110µs46µsTemplate::Constants::::BEGIN@41Template::Constants::BEGIN@41
11110µs51µsTemplate::Constants::::BEGIN@42Template::Constants::BEGIN@42
11110µs40µsTemplate::Constants::::BEGIN@57Template::Constants::BEGIN@57
1119µs51µsTemplate::Constants::::BEGIN@45Template::Constants::BEGIN@45
1119µs41µsTemplate::Constants::::BEGIN@54Template::Constants::BEGIN@54
1119µs41µsTemplate::Constants::::BEGIN@60Template::Constants::BEGIN@60
1119µs43µsTemplate::Constants::::BEGIN@72Template::Constants::BEGIN@72
1119µs40µsTemplate::Constants::::BEGIN@73Template::Constants::BEGIN@73
1119µs40µsTemplate::Constants::::BEGIN@51Template::Constants::BEGIN@51
1119µs41µsTemplate::Constants::::BEGIN@79Template::Constants::BEGIN@79
1119µs41µsTemplate::Constants::::BEGIN@65Template::Constants::BEGIN@65
1118µs45µsTemplate::Constants::::BEGIN@74Template::Constants::BEGIN@74
1118µs37µsTemplate::Constants::::BEGIN@50Template::Constants::BEGIN@50
1118µs39µsTemplate::Constants::::BEGIN@58Template::Constants::BEGIN@58
1118µs43µsTemplate::Constants::::BEGIN@80Template::Constants::BEGIN@80
1118µs38µsTemplate::Constants::::BEGIN@49Template::Constants::BEGIN@49
1118µs45µsTemplate::Constants::::BEGIN@64Template::Constants::BEGIN@64
1118µs38µsTemplate::Constants::::BEGIN@61Template::Constants::BEGIN@61
3226µs6µsTemplate::Constants::::DEBUG_UNDEFTemplate::Constants::DEBUG_UNDEF (xsub)
2115µs5µsTemplate::Constants::::DEBUG_OFFTemplate::Constants::DEBUG_OFF (xsub)
2112µs2µsTemplate::Constants::::DEBUG_DIRSTemplate::Constants::DEBUG_DIRS (xsub)
2112µs2µsTemplate::Constants::::DEBUG_ONTemplate::Constants::DEBUG_ON (xsub)
2112µs2µsTemplate::Constants::::DEBUG_VARSTemplate::Constants::DEBUG_VARS (xsub)
2111µs1µsTemplate::Constants::::DEBUG_PLUGINSTemplate::Constants::DEBUG_PLUGINS (xsub)
2111µs1µsTemplate::Constants::::DEBUG_CALLERTemplate::Constants::DEBUG_CALLER (xsub)
2111µs1µsTemplate::Constants::::DEBUG_CONTEXTTemplate::Constants::DEBUG_CONTEXT (xsub)
2111µs1µsTemplate::Constants::::DEBUG_FILTERSTemplate::Constants::DEBUG_FILTERS (xsub)
2111µs1µsTemplate::Constants::::DEBUG_PARSERTemplate::Constants::DEBUG_PARSER (xsub)
2111µs1µsTemplate::Constants::::DEBUG_ALLTemplate::Constants::DEBUG_ALL (xsub)
2111µs1µsTemplate::Constants::::DEBUG_PROVIDERTemplate::Constants::DEBUG_PROVIDER (xsub)
2111µs1µsTemplate::Constants::::DEBUG_SERVICETemplate::Constants::DEBUG_SERVICE (xsub)
2111µs1µsTemplate::Constants::::DEBUG_STASHTemplate::Constants::DEBUG_STASH (xsub)
0000s0sTemplate::Constants::::debug_flagsTemplate::Constants::debug_flags
Call graph for these subroutines as a Graphviz dot language file.
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
19package Template::Constants;
20
2111µsrequire Exporter;
22334µs224µ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
use strict;
# spent 20µs making 1 call to Template::Constants::BEGIN@22 # spent 4µs making 1 call to strict::import
23326µs236µ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
use warnings;
# spent 24µs making 1 call to Template::Constants::BEGIN@23 # spent 12µs making 1 call to warnings::import
24334µs263µ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
use Exporter;
# 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 );
27342µs2115µ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
use vars qw( @EXPORT_OK %EXPORT_TAGS );
# spent 63µs making 1 call to Template::Constants::BEGIN@27 # spent 52µs making 1 call to vars::import
28363µs2168µ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
use vars qw( $DEBUG_OPTIONS @STATUS @ERROR @CHOMP @DEBUG @ISA );
# 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
30116µs@ISA = qw( Exporter );
31
321800nsour $VERSION = 2.75;
33
34
35#========================================================================
36# ----- EXPORTER -----
37#========================================================================
38
39# STATUS constants returned by directives
40344µs2184µ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
use constant STATUS_OK => 0; # ok
# spent 100µs making 1 call to Template::Constants::BEGIN@40 # spent 84µs making 1 call to constant::import
41332µs283µ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
use constant STATUS_RETURN => 1; # ok, block ended by RETURN
# spent 46µs making 1 call to Template::Constants::BEGIN@41 # spent 36µs making 1 call to constant::import
42379µs293µ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
use constant STATUS_STOP => 2; # ok, stoppped by STOP
# spent 51µs making 1 call to Template::Constants::BEGIN@42 # spent 42µs making 1 call to constant::import
43337µs2158µ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
use constant STATUS_DONE => 3; # ok, iterator done
# spent 104µs making 1 call to Template::Constants::BEGIN@43 # spent 54µs making 1 call to constant::import
44328µs273µ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
use constant STATUS_DECLINED => 4; # ok, declined to service request
# spent 41µs making 1 call to Template::Constants::BEGIN@44 # spent 32µs making 1 call to constant::import
45373µs292µ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
use constant STATUS_ERROR => 255; # error condition
# 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
48332µs288µ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
use constant ERROR_RETURN => 'return'; # return a status code
# spent 50µs making 1 call to Template::Constants::BEGIN@48 # spent 38µs making 1 call to constant::import
49328µs267µ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
use constant ERROR_FILE => 'file'; # file error: I/O, parse, recursion
# spent 38µs making 1 call to Template::Constants::BEGIN@49 # spent 30µs making 1 call to constant::import
50332µs266µ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
use constant ERROR_VIEW => 'view'; # view error
# spent 37µs making 1 call to Template::Constants::BEGIN@50 # spent 29µs making 1 call to constant::import
51345µs271µ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
use constant ERROR_UNDEF => 'undef'; # undefined variable value used
# spent 40µs making 1 call to Template::Constants::BEGIN@51 # spent 31µs making 1 call to constant::import
52339µs2137µ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
use constant ERROR_PERL => 'perl'; # error in [% PERL %] block
# spent 75µs making 1 call to Template::Constants::BEGIN@52 # spent 62µs making 1 call to constant::import
53333µs293µ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
use constant ERROR_FILTER => 'filter'; # filter error
# spent 52µs making 1 call to Template::Constants::BEGIN@53 # spent 41µs making 1 call to constant::import
54332µs272µ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
use constant ERROR_PLUGIN => 'plugin'; # plugin error
# 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
57328µs270µ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
use constant CHOMP_NONE => 0; # do not remove whitespace
# spent 40µs making 1 call to Template::Constants::BEGIN@57 # spent 31µs making 1 call to constant::import
58329µs270µ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
use constant CHOMP_ALL => 1; # remove whitespace up to newline
# spent 39µs making 1 call to Template::Constants::BEGIN@58 # spent 31µs making 1 call to constant::import
59331µs274µ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
use constant CHOMP_ONE => 1; # new name for CHOMP_ALL
# spent 43µs making 1 call to Template::Constants::BEGIN@59 # spent 31µs making 1 call to constant::import
60328µs272µ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
use constant CHOMP_COLLAPSE => 2; # collapse whitespace to a single space
# spent 41µs making 1 call to Template::Constants::BEGIN@60 # spent 32µs making 1 call to constant::import
61332µs268µ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
use constant CHOMP_GREEDY => 3; # remove all whitespace including newlines
# 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
64330µs283µ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
use constant DEBUG_OFF => 0; # do nothing
# spent 45µs making 1 call to Template::Constants::BEGIN@64 # spent 37µs making 1 call to constant::import
65336µs273µ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
use constant DEBUG_ON => 1; # basic debugging flag
# spent 41µs making 1 call to Template::Constants::BEGIN@65 # spent 32µs making 1 call to constant::import
66356µs2140µ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
use constant DEBUG_UNDEF => 2; # throw undef on undefined variables
# spent 79µs making 1 call to Template::Constants::BEGIN@66 # spent 61µs making 1 call to constant::import
67335µs290µ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
use constant DEBUG_VARS => 4; # general variable debugging
# spent 50µs making 1 call to Template::Constants::BEGIN@67 # spent 40µs making 1 call to constant::import
68330µs272µ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
use constant DEBUG_DIRS => 8; # directive debugging
# spent 41µs making 1 call to Template::Constants::BEGIN@68 # spent 31µs making 1 call to constant::import
69348µs275µ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
use constant DEBUG_STASH => 16; # general stash debugging
# spent 43µs making 1 call to Template::Constants::BEGIN@69 # spent 32µs making 1 call to constant::import
70336µs2120µ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
use constant DEBUG_CONTEXT => 32; # context debugging
# spent 66µs making 1 call to Template::Constants::BEGIN@70 # spent 55µs making 1 call to constant::import
71335µs293µ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
use constant DEBUG_PARSER => 64; # parser debugging
# spent 60µs making 1 call to Template::Constants::BEGIN@71 # spent 33µs making 1 call to constant::import
72331µs276µ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
use constant DEBUG_PROVIDER => 128; # provider debugging
# spent 43µs making 1 call to Template::Constants::BEGIN@72 # spent 34µs making 1 call to constant::import
73329µs270µ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
use constant DEBUG_PLUGINS => 256; # plugins debugging
# spent 40µs making 1 call to Template::Constants::BEGIN@73 # spent 30µs making 1 call to constant::import
74334µs282µ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
use constant DEBUG_FILTERS => 512; # filters debugging
# spent 45µs making 1 call to Template::Constants::BEGIN@74 # spent 37µs making 1 call to constant::import
75358µs2140µ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
use constant DEBUG_SERVICE => 1024; # context debugging
# spent 77µs making 1 call to Template::Constants::BEGIN@75 # spent 63µs making 1 call to constant::import
76339µs2105µ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
use constant DEBUG_ALL => 2047; # everything
# 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
79334µs273µ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
use constant DEBUG_CALLER => 4096; # add caller file/line
# spent 41µs making 1 call to Template::Constants::BEGIN@79 # spent 32µs making 1 call to constant::import
803585µs278µ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
use constant DEBUG_FLAGS => 4096; # bitmask to extraxt flags
# spent 43µs making 1 call to Template::Constants::BEGIN@80 # spent 35µs making 1 call to constant::import
81
821156µs2825µ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
9912µs@STATUS = qw( STATUS_OK STATUS_RETURN STATUS_STOP STATUS_DONE
100 STATUS_DECLINED STATUS_ERROR );
10111µs@ERROR = qw( ERROR_FILE ERROR_VIEW ERROR_UNDEF ERROR_PERL
102 ERROR_RETURN ERROR_FILTER ERROR_PLUGIN );
10311µs@CHOMP = qw( CHOMP_NONE CHOMP_ALL CHOMP_ONE CHOMP_COLLAPSE CHOMP_GREEDY );
10415µ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
10914µs@EXPORT_OK = ( @STATUS, @ERROR, @CHOMP, @DEBUG );
110113µs%EXPORT_TAGS = (
111 'all' => [ @EXPORT_OK ],
112 'status' => [ @STATUS ],
113 'error' => [ @ERROR ],
114 'chomp' => [ @CHOMP ],
115 'debug' => [ @DEBUG ],
116);
117
118
119sub 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
157123µs1;
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
sub Template::Constants::DEBUG_ALL; # xsub
# 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
sub Template::Constants::DEBUG_CALLER; # xsub
# 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
sub Template::Constants::DEBUG_CONTEXT; # xsub
# 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
sub Template::Constants::DEBUG_DIRS; # xsub
# 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
sub Template::Constants::DEBUG_FILTERS; # xsub
# 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
sub Template::Constants::DEBUG_OFF; # xsub
# 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
sub Template::Constants::DEBUG_ON; # xsub
# 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
sub Template::Constants::DEBUG_PARSER; # xsub
# 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
sub Template::Constants::DEBUG_PLUGINS; # xsub
# 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
sub Template::Constants::DEBUG_PROVIDER; # xsub
# 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
sub Template::Constants::DEBUG_SERVICE; # xsub
# 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
sub Template::Constants::DEBUG_STASH; # xsub
# 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
sub Template::Constants::DEBUG_UNDEF; # xsub
# 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
sub Template::Constants::DEBUG_VARS; # xsub