Hello everyone,
My name is Kei Fujii who is a cygwin-perl user on Windows XP.
I'm sending an error & fix report of PAR::Packer 1.003 installation on cygwin.
When I tried to install PAR::Packer(PAR-Packer-1.003-K0romy)
by using "perl -MCPAN -e shell", the following error message was shown
and installation was failed.
t/30-current_exec.t ...... 3/4
# Failed test 'Found the same file via PATH and full path'
# at t/30-current_exec.t line 55.
# got: ''
# expected: '0 =
/home/foobar/.cpan/build/PAR-Packer-1.003-K0romy/t/test-10.exec
# PAR_PROGNAME =
/home/foobar/.cpan/build/PAR-Packer-1.003-K0romy/t/test-10.exec
# PAR_TEMP =
/home/foobar/.cpan/build/PAR-Packer-1.003-K0romy/t-tmp/par-foobar/cache-omitomit
# exec =
# '
# Looks like you failed 1 test of 4.
I thought this error occurred around the following code
in PAR-Packer-1.003-K0romy/t/30-current_exec.t
my $out_path = do { local $ENV{PATH} = $path; qx($file); };
is( $out_path, $out_full, "Found the same file via PATH and full path" );
In my computer, content of variables were the following:
$file == test-10.exec
$path == /home/foobar/.cpan/build/PAR-Packer-1.003-K0romy/t/
So I tried to do same thing on cygwin command line (shell=tcsh) like this:
> set path = ( /home/foobar/.cpan/build/PAR-Packer-1.003-K0romy/t/ )
> rehash
> test-10.exec
>
test-10.exec is expected to output some strings.
But there is no output in the above case.
However, the following case seems to have good result:
> set path = ( /home/foobar/.cpan/build/PAR-Packer-1.003-K0romy/t/ $path )
> rehash
> test-10.exec
0 = /home/foobar/.cpan/build/PAR-Packer-1.003-K0romy/t/test-10.exec
PAR_PROGNAME =
/home/foobar/.cpan/build/PAR-Packer-1.003-K0romy/t/test-10.exec
PAR_TEMP =
/home/foobar/.cpan/build/PAR-Packer-1.003-K0romy/t-tmp/par-foobar/cache-omitomit
exec =
>
So I changed the above code to the following:
my $out_path = do { local $ENV{PATH} = "$path:$ENV{PATH}"; qx($file); };
is( $out_path, $out_full, "Found the same file via PATH and full path" );
As a result, "make test" was success and now I can use pp command on cygwin.
I'm glad if this report help something...
Best regard,
// Kei Fujii
// Kumamoto National College of Technology, JAPAN
// Email: [email protected]