📄 chart.csv.tmpl
字号:
#------------------------------------------------------------------------# Compiled template generated by the Template Toolkit version 2.13#------------------------------------------------------------------------Template::Document->new({ METADATA => { 'modtime' => '1056583382', 'name' => 'reports/chart.csv.tmpl', }, BLOCK => sub { my $context = shift || die "template sub called without context\n"; my $stash = $context->stash; my $output = ''; my $error; eval { BLOCK: { $output .= "\n"; $output .= "\n"; #line 23 "template\en\default\reports\chart.csv.tmpl" $stash->set('data', $stash->get(['chart', 0, 'data', 0])); $output .= "\nDate\\Series,"; #line 26 "template\en\default\reports\chart.csv.tmpl" # FOREACH do { my ($value, $error, $oldloop); my $list = $stash->get(['chart', 0, 'labels', 0]); unless (UNIVERSAL::isa($list, 'Template::Iterator')) { $list = Template::Config->iterator($list) || die $Template::Config::ERROR, "\n"; } ($value, $error) = $list->get_first(); eval { $oldloop = $stash->get('loop') }; $stash->set('loop', $list); eval { LOOP: while (! $error) { $stash->{'label'} = $value; #line 26 "template\en\default\reports\chart.csv.tmpl" # FILTER $output .= do { my $output = ''; my $filter = $context->filter('csv') || $context->throw($context->error); $output .= $stash->get('label'); &$filter($output); }; #line 26 "template\en\default\reports\chart.csv.tmpl" if (!($stash->get(['loop', 0, 'last', 0]))) { $output .= ','; } ; ($value, $error) = $list->get_next(); } }; $stash->set('loop', $oldloop); die $@ if $@; $error = 0 if $error && $error eq Template::Constants::STATUS_DONE; die $error if $error; }; $output .= "\n"; #line 30 "template\en\default\reports\chart.csv.tmpl" $stash->set('i', 0); #line 33 "template\en\default\reports\chart.csv.tmpl" # WHILE do { my $failsafe = 1000; LOOP: while (--$failsafe && ($stash->get('i') < $stash->get(['data', 0, 0, 0, 'size', 0]))) { #line 30 "template\en\default\reports\chart.csv.tmpl" $stash->set('j', 0); #line 30 "template\en\default\reports\chart.csv.tmpl" # WHILE do { my $failsafe = 1000; LOOP: while (--$failsafe && ($stash->get('j') < $stash->get(['data', 0, 'size', 0]))) { #line 30 "template\en\default\reports\chart.csv.tmpl" $output .= $stash->get(['data', 0, $stash->get('j'), 0, $stash->get('i'), 0]); #line 30 "template\en\default\reports\chart.csv.tmpl" if (!(($stash->get('j') eq $stash->get(['data', 0, 'size', 0]) - 1))) { $output .= ','; } #line 30 "template\en\default\reports\chart.csv.tmpl" $stash->set('j', $stash->get('j') + 1); } die "WHILE loop terminated (> 1000 iterations)\n" unless $failsafe; }; #line 30 "template\en\default\reports\chart.csv.tmpl" $stash->set('i', $stash->get('i') + 1); $output .= "\n"; } die "WHILE loop terminated (> 1000 iterations)\n" unless $failsafe; }; $output .= " \n"; } }; if ($@) { $error = $context->catch($@, \$output); die $error unless $error->type eq 'return'; } return $output; }, DEFBLOCKS => { },});
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -