From a0f82c5015864abf7d2afa42d48efef8ed68df08 Mon Sep 17 00:00:00 2001 From: Jon Dowland Date: Wed, 20 Apr 2011 22:58:52 +0100 Subject: [PATCH 1/2] use debug() for wrapper-generation print outs Use the debug() subroutine for printing out when wrappers are generated. This has the effect of hiding the messages unless verbose mode is enabled. --- IkiWiki/Wrapper.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/IkiWiki/Wrapper.pm b/IkiWiki/Wrapper.pm index 84cc7540b..d3b3e00ea 100644 --- a/IkiWiki/Wrapper.pm +++ b/IkiWiki/Wrapper.pm @@ -237,8 +237,7 @@ EOF error("rename $wrapper.new $wrapper: $!"); } #translators: The parameter is a filename. - printf(gettext("successfully generated %s"), $wrapper); - print "\n"; + debug(gettext("successfully generated %s"), $wrapper); } 1 From b7a49ee36479a00208ee80343fc3fc2be2da92fb Mon Sep 17 00:00:00 2001 From: Jon Dowland Date: Wed, 20 Apr 2011 23:10:33 +0100 Subject: [PATCH 2/2] fix use of debug() without sprintf() Previous commit substituted a printf call (two arguments) for debug (accepts only one). Interleave an sprintf call to resolve. --- IkiWiki/Wrapper.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IkiWiki/Wrapper.pm b/IkiWiki/Wrapper.pm index d3b3e00ea..4fe2d8111 100644 --- a/IkiWiki/Wrapper.pm +++ b/IkiWiki/Wrapper.pm @@ -237,7 +237,7 @@ EOF error("rename $wrapper.new $wrapper: $!"); } #translators: The parameter is a filename. - debug(gettext("successfully generated %s"), $wrapper); + debug(sprintf(gettext("successfully generated %s"), $wrapper)); } 1