| Filename | /home/vagrant/kohaclone/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-open.inc |
| Statements | Executed 16 statements in 118µs |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 4 | 1 | 1 | 188µs | 19.6ms | Template::Document::__ANON__[:36] |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | # spent 19.6ms (188µs+19.4) within Template::Document::__ANON__[/home/vagrant/kohaclone/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-open.inc:36] which was called 4 times, avg 4.90ms/call:
# 4 times (188µs+19.4ms) by Template::Document::process at line 163 of Template/Document.pm, avg 4.90ms/call | ||||
| 2 | 1 | 45µs | 16 | 611µs | $output .= $stash->get(['template', 0, 'name', 0, 'split', [ '/' ], 'last', 0]); # spent 381µs making 4 calls to Template::Stash::XS::get, avg 95µs/call
# spent 144µs making 4 calls to Template::VMethods::text_split, avg 36µs/call
# spent 63µs making 4 calls to Template::Document::AUTOLOAD, avg 16µs/call
# spent 23µs making 4 calls to Template::VMethods::list_last, avg 6µs/call |
| 3 | 1 | 800ns | $output .= " -->\n\n"; | ||
| 4 | #line 4 "/home/vagrant/kohaclone/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-open.inc" | ||||
| 5 | 1 | 9µs | 8 | 1.95ms | # USE # spent 1.93ms making 4 calls to Template::Context::plugin, avg 482µs/call
# spent 19µs making 4 calls to Template::Stash::XS::set, avg 5µs/call |
| 6 | $stash->set('Koha', | ||||
| 7 | 2 | 1µs | $context->plugin('Koha')); | ||
| 8 | 1 | 600ns | $output .= "\n"; | ||
| 9 | #line 22 "/home/vagrant/kohaclone/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-open.inc" | ||||
| 10 | if ($stash->get(['Koha', 0, 'Preference', [ 'DumpTemplateVarsIntranet' ]])) { | ||||
| 11 | $output .= "\n "; | ||||
| 12 | #line 21 "/home/vagrant/kohaclone/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-open.inc" | ||||
| 13 | |||||
| 14 | # TRY | ||||
| 15 | $output .= do { | ||||
| 16 | my $output = ''; | ||||
| 17 | my ($_tt_error, $_tt_handler); | ||||
| 18 | eval { | ||||
| 19 | $output .= "\n "; | ||||
| 20 | #line 7 "/home/vagrant/kohaclone/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-open.inc" | ||||
| 21 | # USE | ||||
| 22 | 1 | 21µs | 8 | 33.8ms | $stash->set('Stash', # spent 17.0ms making 4 calls to Template::Stash::XS::get, avg 4.24ms/call
# spent 16.9ms making 4 calls to Koha::Template::Plugin::Koha::Preference, avg 4.22ms/call |
| 23 | $context->plugin('Stash')); | ||||
| 24 | 2 | 26µs | 12 | 121µs | $output .= "\n "; # spent 104µs making 8 calls to Template::Stash::XS::get, avg 13µs/call
# spent 17µs making 4 calls to Template::Stash::undefined, avg 4µs/call |
| 25 | 1 | 500ns | #line 8 "/home/vagrant/kohaclone/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-open.inc" | ||
| 26 | # USE | ||||
| 27 | $stash->set('Dumper', | ||||
| 28 | 2 | 2µs | $context->plugin('Dumper')); | ||
| 29 | $output .= "\n <!--\n "; | ||||
| 30 | 1 | 500ns | #line 14 "/home/vagrant/kohaclone/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-open.inc" | ||
| 31 | |||||
| 32 | # FILTER | ||||
| 33 | $output .= do { | ||||
| 34 | my $output = ''; | ||||
| 35 | 1 | 4µs | my $_tt_filter = $context->filter('replace', [ '<!--', '<!- -' ]) | ||
| 36 | || $context->throw($context->error); | ||||
| 37 | 1 | 6µs | |||
| 38 | $output .= "\n "; | ||||
| 39 | #line 13 "/home/vagrant/kohaclone/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-open.inc" | ||||
| 40 | |||||
| 41 | # FILTER | ||||
| 42 | $output .= do { | ||||
| 43 | my $output = ''; | ||||
| 44 | my $_tt_filter = $context->filter('replace', [ '-->', '- ->' ]) | ||||
| 45 | || $context->throw($context->error); | ||||
| 46 | |||||
| 47 | 1 | 1µs | $output .= "\n "; | ||
| 48 | #line 12 "/home/vagrant/kohaclone/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-open.inc" | ||||
| 49 | $output .= $stash->get(['Dumper', 0, 'dump', [ $stash->get(['Stash', 0, 'stash', 0]) ]]); | ||||
| 50 | $output .= "\n "; | ||||
| 51 | |||||
| 52 | &$_tt_filter($output); | ||||
| 53 | }; | ||||
| 54 | |||||
| 55 | $output .= "\n "; | ||||
| 56 | |||||
| 57 | &$_tt_filter($output); | ||||
| 58 | }; | ||||
| 59 | |||||
| 60 | $output .= "\n -->\n "; | ||||
| 61 | }; | ||||
| 62 | if ($@) { | ||||
| 63 | $_tt_error = $context->catch($@, \$output); | ||||
| 64 | die $_tt_error if $_tt_error->type =~ /^return|stop$/; | ||||
| 65 | $stash->set('error', $_tt_error); | ||||
| 66 | $stash->set('e', $_tt_error); | ||||
| 67 | if (defined ($_tt_handler = $_tt_error->select_handler())) { | ||||
| 68 | $_tt_error = 0; | ||||
| 69 | } | ||||
| 70 | else { | ||||
| 71 | # DEFAULT | ||||
| 72 | $output .= "\n <!--\n DumpTemplateVarsIntranet is set to 'Do', but\n Template::Plugin::Stash is not installed.\n -->\n "; | ||||
| 73 | $_tt_error = ''; | ||||
| 74 | } | ||||
| 75 | } | ||||
| 76 | # FINAL | ||||
| 77 | die $_tt_error if $_tt_error; | ||||
| 78 | $output; | ||||
| 79 | }; | ||||
| 80 | |||||
| 81 | $output .= "\n"; | ||||
| 82 | } | ||||
| 83 | |||||
| 84 | $output .= "\n\n"; | ||||
| 85 | #line 24 "/home/vagrant/kohaclone/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-open.inc" | ||||
| 86 | if (($stash->get('bidi'))) { | ||||
| 87 | $output .= "<html lang=\""; | ||||
| 88 | #line 24 "/home/vagrant/kohaclone/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-open.inc" | ||||
| 89 | $output .= $stash->get('lang'); | ||||
| 90 | $output .= "\" dir=\""; | ||||
| 91 | #line 24 "/home/vagrant/kohaclone/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-open.inc" | ||||
| 92 | $output .= $stash->get('bidi'); | ||||
| 93 | $output .= "\">"; | ||||
| 94 | } | ||||
| 95 | else { | ||||
| 96 | $output .= "<html lang=\""; | ||||
| 97 | #line 24 "/home/vagrant/kohaclone/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-open.inc" | ||||
| 98 | $output .= $stash->get('lang'); | ||||
| 99 | $output .= "\">"; | ||||
| 100 | } | ||||
| 101 | |||||
| 102 | $output .= "\n<head>\n"; | ||||
| 103 | } }; | ||||
| 104 | if ($@) { | ||||
| 105 | $_tt_error = $context->catch($@, \$output); | ||||
| 106 | die $_tt_error unless $_tt_error->type eq 'return'; | ||||
| 107 | } | ||||
| 108 | |||||
| 109 | return $output; | ||||
| 110 | } | ||||
| 111 |