[Module::Build] M::B 0.21 OSX warnings
Status: Beta
Brought to you by:
kwilliams
|
From: Chris D. <ch...@cl...> - 2003-10-16 15:20:20
|
I saw a bunch of warnings from 'Build test' on Mac OSX, perl 5.8.1,
M::B v0.21. These occur in manifypods.t, and originate from
File::Spec::Unix::canonpath() getting undef and not handling it
properly.
First, I submitted a patch to File::Spec to better handle the undef.
But, we really shouldn't be handing undef to canonpath in the first
place.
I discovered the source of the undef by running:
perl -w -Mblib -MCarp -e'$SIG{__WARN__}=\&confess;do"t/manifypods.t"'
which showed the cause to be localize_file_path() called with '' as the
path.
The following patch prevents localize_file_path from trying to do any
work if the path is already localized by virtue of being relative.
Chris
--- lib/Module/Build/Base.pm.orig 2003-10-16 09:29:52.000000000
-0500
+++ lib/Module/Build/Base.pm 2003-10-16 10:06:32.000000000 -0500
@@ -1221,6 +1221,7 @@
sub localize_file_path {
my ($self, $path) = @_;
+ return $path unless ($path =~ m{/});
return File::Spec->catfile( split qr{/}, $path );
}
--
Chris Dolan, Software Developer, Clotho Advanced Media Inc.
ch...@cl..., 294-7900, 211 S Paterson, Madison WI 53703
|