Skip to content

Instantly share code, notes, and snippets.

@yak1ex
Last active August 29, 2015 14:00
Show Gist options
  • Save yak1ex/c1a5c61eb038892df818 to your computer and use it in GitHub Desktop.
Save yak1ex/c1a5c61eb038892df818 to your computer and use it in GitHub Desktop.
Pod::Weaver::Section::AllowOverride and bizarre behavior on Perl 5.10 with Dist::ZIlla

Only on Perl 5.10, a bizarre error occurs like https://travis-ci.org/yak1ex/String-Unescape/jobs/24323913

It is reproduced in my local environment (Cygwin) by the following procedure.

  • Clone https://github.com/yak1ex/String-Unescape
  • Install newly Perl-5.10.1 environment by perlbrew
  • Install Dist::Zilla like perlbrew exec --with perl-5.10.1 cpanm Dist::Zilla
  • Install dependent modules like dzil authordeps | perlbrew exec --with perl-5.10.1 cpanm
  • perlbrew exec --with perl-5.10.1 perl /usr/local/bin/dzil build causes error shown in output.log

I created minimal dist causing the same error. It is attached as test.tar.bz2.

  • perlbrew exec --with perl-5.10.1 perl -wc .../Pod/Weaver/Section/AllowOverride.pm shows OK.
  • Use via App::podweaver like perlbrew exec --with perl-5.10.1 podweaver causes no such an error.

So, using via Dist::Zilla::Plugin::PodWeaver triggers something related with the error.

Interestingly, adding use feature qw(:5.10); after use 5.010; magically disappears the error, though I can not understand the reason. As far as I understand, use 5.010; includes use feature qw(:5.10);. So, the root cause of this behavior exists somewhere else and this is just a workaround but it looks too difficult for me to track down the root cause...

perl-5.10.1
==========
[DZ] beginning to build String-Unescape
[DZ] guessing dist's main_module is lib/String/Unescape.pm
[DZ] extracting distribution abstract from lib/String/Unescape.pm
[@Author::YAKEX/@Basic/ExtraTests] rewriting release test xt/release/pod-syntax.t
[@Author::YAKEX/@Basic/ExtraTests] rewriting release test xt/release/pod-coverage.t
[@Author::YAKEX/@Basic/ExtraTests] rewriting author test xt/author/critic.t
[@Author::YAKEX/@Basic/ExtraTests] rewriting release test xt/release/kwalitee.t
Variable "$override" is not imported at /home/atarashi/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/Pod/Weaver/Section/AllowOverride.pm line 139, <GEN5> line 16.
(Did you mean &override instead?)
Variable "$override" is not imported at /home/atarashi/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/Pod/Weaver/Section/AllowOverride.pm line 140, <GEN5> line 16.
(Did you mean &override instead?)
syntax error at /home/atarashi/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/Pod/Weaver/Section/AllowOverride.pm line 133, near ") {"
Global symbol "$prev" requires explicit package name at /home/atarashi/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/Pod/Weaver/Section/AllowOverride.pm line 135, <GEN5> line 16.
Global symbol "$prev" requires explicit package name at /home/atarashi/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/Pod/Weaver/Section/AllowOverride.pm line 137, <GEN5> line 16.
syntax error at /home/atarashi/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/Pod/Weaver/Section/AllowOverride.pm line 139, near ") {"
Global symbol "$override" requires explicit package name at /home/atarashi/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/Pod/Weaver/Section/AllowOverride.pm line 139, <GEN5> line 16.
Global symbol "$override" requires explicit package name at /home/atarashi/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/Pod/Weaver/Section/AllowOverride.pm line 140, <GEN5> line 16.
Bareword "break" not allowed while "strict subs" in use at /home/atarashi/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/Pod/Weaver/Section/AllowOverride.pm line 135, <GEN5> line 16.
Compilation failed in require at /home/atarashi/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/Module/Runtime.pm line 317, <GEN5> line 16. at /home/atarashi/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/cygwin-thread-multi/Moose/Object.pm line 56.
Command [perl /usr/local/bin/dzil build] terminated with exit code 9 ($? = 2304) under the following perl environment:
Command terminated with non-zero status.
Current perl:
Name: perl-5.10.1
Path: /home/atarashi/perl5/perlbrew/perls/perl-5.10.1/bin/perl
Config: -de -Dprefix=/home/atarashi/perl5/perlbrew/perls/perl-5.10.1 -Aeval:scriptdir=/home/atarashi/perl5/perlbrew/perls/perl-5.10.1/bin
Compiled at: May 4 2014 00:18:52
perlbrew:
version: 0.67
ENV:
PERLBREW_ROOT: /home/atarashi/perl5/perlbrew
PERLBREW_HOME: /home/atarashi/.perlbrew
PERLBREW_PATH: /home/atarashi/perl5/perlbrew/bin:/home/atarashi/perl5/perlbrew/perls/perl-5.10.1/bin
PERLBREW_MANPATH: /home/atarashi/perl5/perlbrew/perls/perl-5.10.1/man
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment