Subject: | Devel::REPL::Plugin::ReadLineHistory compile issues under Strawberry |
When trying to install Devel::REPL under Strawberry Perl this error
occurs during make test:
C:\strawberry\perl\bin\perl.exe "-Iinc" Makefile.PL --config=
--installdeps=Moos
e,0.64,MooseX::Object::Pluggable,0.0009,MooseX::Getopt,0.15,MooseX::AttributeHel
pers,0.14,B::Keywords,0,Lexical::Persistence,0
C:\strawberry\perl\bin\perl.exe "-MExtUtils::Command::MM" "-e"
"test_harness(0,
'inc', 'blib\lib', 'blib\arch')" t/load_core.t
t/load_core....1/?
# Failed test 'use Devel::REPL::Plugin::ReadLineHistory;'
# at t/load_core.t line 17.
# Tried to use 'Devel::REPL::Plugin::ReadLineHistory'.
# Error: The getpwuid function is unimplemented at
C:\strawberry\cpan\build
\Devel-REPL-1.003002-9hIhHW\blib\lib/Devel/REPL/Plugin/ReadLineHistory.pm line
1
0.
# Compilation failed in require at (eval 259) line 2.
# BEGIN failed--compilation aborted at (eval 259) line 2.
# Looks like you failed 1 test of 16.
t/load_core.... Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/16 subtests
And here's the perl version info:
C:\strawberry\cpan\build\Devel-REPL-1.003002-9hIhHW>perl -v
This is perl, v5.10.0 built for MSWin32-x86-multi-thread
A quick patch using File::HomeDir rather than relying getpwuid seems to
do the trick (attahced).
Cheers,
Dan B aka broquaint
Subject: | ReadLineHistory.pm.diff |
8a9
> use File::HomeDir;
11c12
< (($ENV{HOME} || (getpwuid($<))[7]) . "/.perlreplhist");
---
> (File::HomeDir->my_home . "/.perlreplhist");