Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: make test and File::Spec problems

by dulwar (Monk)
on Jun 29, 2012 at 21:38 UTC ( #979185=note: print w/replies, xml ) Need Help??

in reply to make test and File::Spec problems

The documentation for File::Spec::catpath specifies:

Takes volume, directory and file portions and returns an entire path. Under Unix, $volume is ignored, and directory and file are concatenated. A / is inserted if need be. On other OSes, $volume is significant.

    $full_path = File::Spec->catpath( $volume, $directory, $file );

The call in your script is missing the third parameter $file, so the catpath method is using an undefined value in the concatenation. If you change the line to

    File::Spec->catpath("","/usr/bin", "");

then you will not get the warnings.

Replies are listed 'Best First'.
Re^2: make test and File::Spec problems
by Dirk80 (Monk) on Jun 29, 2012 at 21:48 UTC

    Thank you. I'm sure that's the reason for the warnings. And I'd like to try it. But I first have to find out how to downgrade the module Test::Harness from 3.25 back to 3.23.


    Downgraded to Test::Harness 3.23 with the following command within the cpan shell:

    install ANDYA/Test-Harness-3.23.tar.gz

    Then I checked that the correct version is installed with:

    perl -MTest::Harness -e 'print "$Test::Harness::VERSION\n"'

    Then I updated the line in the test script. And you are right. The warnings are gone now also when I'm using Test::Harness Version 3.23.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://979185]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2016-10-25 01:00 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (313 votes). Check out past polls.