1

I am trying to install Bio::Root::Version in my MacOsX Mojave, it requires XML::DOM::XPath but when I try to install it with:

cpan XML::DOM::XPath

it fail with:

-------------------
t/test_non_ascii.t                  (Wstat: 512 Tests: 0 Failed: 0)
  Non-zero exit status: 2
  Parse errors: Bad plan.  You planned 10 tests but ran 0.

Following other workarounds that suggested to change:

use utf8;

to:

use encoding 'utf8';

I tried to look at the file in:

cat /Users/cccnrc/.cpan/build/XML-DOM-XPath-0.14-5/t/test_non_ascii.t

but it already states:

use encoding 'utf8';

Does anybody got a clue? I am desperate!

Thanks a lot in advance for any help!

1 Answer 1

0

You need to change use encoding 'utf8'; to use utf8;

I was using cpanm to install the XML::DOM::XPath and encountered the same error as yours. The issue is with the encoding on line 10 of t/test_non_ascii.t. It uses encoding.pm which is no longer supported after Perl 5.25.3.

To fix this issue, you should modify the "test_non_ascii.t" file (e.g. the path of mine is "/Users/USER_NAME/.cpanm/work/1565320320.17142/XML-DOM-XPath-0.14/t") - change use encoding 'utf8'; to use utf8;, and then run the install command using this modified file

cpanm /Users/USER_NAME/.cpanm/work/1565320320.17142/XML-DOM-XPath-0.14

It should work.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .