Subject: | If weaver.* exists, logger is not correctly passed to Pod::Weaver |
If weaver.* exists in Dist::Zilla root directory, this plugin calls
Pod::Weaver->new_from_config($arg).
Pod::Weaver::new_from_config takes 2 arguments, excluding class name, and
the 2nd argument is passed to Pod::Weaver::new_from_config_sequence(). In
this case, it is undef because there is only one argument: $arg. logger
is set in Pod::Weaver::new_from_config_sequence() according to the
argument. Therefore, logger in Dist::ZIlla is not correctly passed to
Pod::Weaver.
Actually, `dzil listdeps' mutes Dist::Zilla logger but not Pod::Weaver
logger in this case. So, unintentional log messages are embedded into
dependency list output.
I am not sure that what is the best solution. Attached patch, however,
fixes this behavior anyway.
Subject: | fix.patch |
--- /usr/lib/perl5/site_perl/5.14/Dist/Zilla/Plugin/PodWeaver.pm.orig 2012-11-07 22:48:51.872516600 +0900
+++ /usr/lib/perl5/site_perl/5.14/Dist/Zilla/Plugin/PodWeaver.pm 2012-11-07 22:52:56.707997700 +0900
@@ -45,7 +45,7 @@
return Pod::Weaver->new_from_config_sequence($assembler->sequence, $arg);
} elsif (@files) {
- return Pod::Weaver->new_from_config($arg);
+ return Pod::Weaver->new_from_config($arg, $arg);
} else {
return Pod::Weaver->new_with_default_config($arg);
}