This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Update to ExtUtils::CBuilder 0.280226
authorAlberto Simões <ambs@cpan.org>
Fri, 14 Jul 2017 13:14:05 +0000 (14:14 +0100)
committerJames E Keenan <jkeenan@cpan.org>
Sat, 15 Jul 2017 17:00:48 +0000 (13:00 -0400)
commita83beb4335050b314e601c8ec224be61aa0b5f02
tree2c702358301443c2506e8fa23e3fa5d433de2e40
parentf73b203fbe2138ae0eac7c523450d08227309933
Update to ExtUtils::CBuilder 0.280226

File::Basename::fileparse(), when called with two arguments, is
documented to return a list of three elements:

    The non-suffix part of the file's basename.

    The file's dirname, plus trailing path separator.

    The suffix part of the file's basename.

Thus,

    my ($name,$path,$suffix) = fileparse('/tmp/perl/p5p/foo.patch', qr/\.[^.]*/);

returns:

    $name:      foo
    $path:      /tmp/perl/p5p/
    $suffix:    .patch

If we want to take those values and compose a path with
File::Spec->catfile(), we have to bear in mind that File::Spec generally
expects to have directories precede filenames in its arguments.  Thus,
the correct way to use the values returned by fileparse() would be:

    my $cf = File::Spec->catfile($path, $name . $suffix);

In ExtUtils::CBuilder::Base::new(), however, the return values from
fileparse() were named in a way that suggested that the first value
would be the dirname and the second would be the non-suffix part of the
basename:

    my ($ccpath, $ccbase, $ccsfx ) = fileparse($self->{config}{cc}, qr/\.[^.]*/);

$ccpath -- which here is really a basename -- was then used as the first
argument to catfile():

    File::Spec->catfile( $ccpath, $cxx, $ccsfx )

In addition, in the above $ccsfx should not have been a separate
argument.  Rather, it should have been concatenated without a path
separator to the second argument.

For: RT # 131749.  See also:
https://github.com/Perl-Toolchain-Gang/ExtUtils-CBuilder/pull/6 (thanks
to stphnlyd of Perl Toolchain Gang).

Signed-off-by: James E Keenan <jkeenan@cpan.org>
17 files changed:
dist/ExtUtils-CBuilder/Changes
dist/ExtUtils-CBuilder/LICENSE
dist/ExtUtils-CBuilder/Makefile.PL
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder.pm
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Base.pm
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Unix.pm
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/VMS.pm
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows.pm
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows/BCC.pm
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows/GCC.pm
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows/MSVC.pm
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/aix.pm
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/android.pm
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/cygwin.pm
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/darwin.pm
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/dec_osf.pm
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/os2.pm