问题
I'm trying to install the Tree::Suffix module from CPAN on a Debian testing system, with Perl 5.18.1 installed.
During compliation, I get a bunch of syntax errors and warnings, related to Devel::CheckLib.
CPAN.pm: Building G/GR/GRAY/Tree-Suffix-0.21.tar.gz
syntax error at inc/Devel/CheckLib.pm line 164, near "$mm_attr_key qw(LIBS INC)"
syntax error at inc/Devel/CheckLib.pm line 171, near "}"
Global symbol "%args" requires explicit package name at inc/Devel/CheckLib.pm line 175.
syntax error at inc/Devel/CheckLib.pm line 179, near "}"
syntax error at inc/Devel/CheckLib.pm line 185, near "}"
Global symbol "@headers" requires explicit package name at inc/Devel/CheckLib.pm line 192.
Global symbol "@libs" requires explicit package name at inc/Devel/CheckLib.pm line 223.
Global symbol "@libpaths" requires explicit package name at inc/Devel/CheckLib.pm line 230.
Global symbol "@libpaths" requires explicit package name at inc/Devel/CheckLib.pm line 236.
Global symbol "@libpaths" requires explicit package name at inc/Devel/CheckLib.pm line 240.
syntax error at inc/Devel/CheckLib.pm line 252, near "}"
inc/Devel/CheckLib.pm has too many errors.
Compilation failed in require at Makefile.PL line 7.
Full log is here.
Am I doing anything wrong? Can somebody please confirm these errors occur when trying to install Tree::Suffix?
If this is a bug, does it belong to Tree::Suffix, to Devel::CheckLib, Perl or Debian?
Any help would be greatly appreciated!
回答1:
It's an old bundled version of Devel::CheckLib which is using syntax now invalid in perl 5.18.x. For the details see the freshly created RT Ticket. Probably it will work if you add the missing parenthesis around the for ... qw(...)
calls.
来源:https://stackoverflow.com/questions/20587171/develchecklib-syntax-errors-when-trying-to-install-treesuffix