summaryrefslogtreecommitdiffstats
path: root/.ikiwiki/IkiWiki/Plugin
diff options
context:
space:
mode:
authorGustav Eek <gustav.eek@fripost.org>2019-12-14 15:01:48 +0100
committerGustav Eek <gustav.eek@fripost.org>2020-01-06 13:31:44 +0100
commit8789cce4b995551405d701d8403a0cbc955dd82f (patch)
tree9d1ce8b8b6d464ba07bde3e7a4ec5d20f1c1a7ee /.ikiwiki/IkiWiki/Plugin
parent68534afeffad17c37337cb350fd10998da973def (diff)
In pandoc.pm update Debug printing to file
Diffstat (limited to '.ikiwiki/IkiWiki/Plugin')
-rwxr-xr-x.ikiwiki/IkiWiki/Plugin/pandoc.pm28
1 files changed, 15 insertions, 13 deletions
diff --git a/.ikiwiki/IkiWiki/Plugin/pandoc.pm b/.ikiwiki/IkiWiki/Plugin/pandoc.pm
index b208b9a..4a7eb31 100755
--- a/.ikiwiki/IkiWiki/Plugin/pandoc.pm
+++ b/.ikiwiki/IkiWiki/Plugin/pandoc.pm
@@ -419,17 +419,14 @@ sub htmlize ($@) {
$fnm = sprintf "%s.%.1d.%s", $fnm_pfx, $m++, "params";
open($fh, '>', $fnm) or die "Could not";
$Data::Dumper::Indent = 2;
- print $fh Dumper(%params), "\n";
+ print $fh Data::Dumper->Dump([\%params], ["params"]), "\n";
close $fh;
# END
# DEBUG Print half way pagestate pagestate
$fnm = sprintf "%s.%.1d.%s", $fnm_pfx, $m++, "early-pagestate";
open($fh, '>>', $fnm);
- my %pagestate_dumper = (
- $page => $pagestate{$page},
- );
- print $fh Data::Dumper->Dump([\%pagestate_dumper], [qw("pagestate")]), "\n";
+ print $fh Data::Dumper->Dump([$pagestate{$page}], ['pagestate']), "\n";
close $fh;
# END
@@ -714,10 +711,7 @@ sub htmlize ($@) {
# DEBUG Print pagestate again
$fnm = sprintf "%s.%.1d.%s", $fnm_pfx, $m++, "return-pagestate";
open($fh, '>>', $fnm);
- %pagestate_dumper = (
- $page => $pagestate{$page},
- );
- print $fh Data::Dumper->Dump([\%pagestate_dumper], [qw("pagestate")]), "\n";
+ print $fh Data::Dumper->Dump([$pagestate{$page}], ['pagestate']), "\n";
close $fh;
# END
@@ -758,11 +752,19 @@ sub pagetemplate (@) {
# DEBUG Print pagetemplate data
my $fnm_pfx = debug_get_filename_prefix ("pagetemplate", $page);
my $m = 0;
- my $fnm = sprintf "%s.%s.%.1d.%s", $fnm_pfx, $filenamebase, $m++, "data";
+ my $fnm = sprintf "%s.%s.%.1d.%s", $fnm_pfx, $filenamebase, $m++, "template";
open($fh, '>', $fnm) or die "Could not";
- my @keys = keys $template->%*;
- print $fh Data::Dumper->Dump([$template], [qw(teplate)]), "\n";
- # print $fh Data::Dumper->Dump([%params], [qw(params)]), "\n";
+ print $fh Data::Dumper->Dump([$template->{'mtime'}], ["mtime"]), "\n";
+ print $fh Data::Dumper->Dump([$template->{'options'}], ['options']), "\n";
+ print $fh Data::Dumper->Dump(
+ [$template->{'param_map'}], ['param_map']), "\n";
+ print $fh Data::Dumper->Dump(
+ [$template->{'parse_stack'}], ['parse_stack']),"\n";
+ close $fh;
+
+ $fnm = sprintf "%s.%s.%.1d.%s", $fnm_pfx, $filenamebase, $m++, "output";
+ open($fh, '>', $fnm) or die "Could not";
+ print $fh $template->output();
close $fh;
# END