Re: [Module::Build] M::B 0.21 OSX warnings
Status: Beta
Brought to you by:
kwilliams
|
From: Ken W. <ke...@ma...> - 2003-10-17 00:56:53
|
On Thursday, October 16, 2003, at 07:41 PM, Ken Williams wrote:
>
> I didn't see this because I'm using a newer version of File::Spec, I
> guess. What line in t/manifypods.t is causing the problem?
>
Ah, I see now. It's this:
my %distro = (
'bin/sample.pl' => "sample.pl.$man{ext1}",
'lib/Sample/Docs.pod' => "Sample$man{sep}Docs.$man{ext3}",
'lib/Sample.pm' => "Sample.$man{ext3}",
'script' => '',
'lib/Sample/NoPod.pm' => '',
);
$_ = $m->localize_file_path($_) foreach %distro;
We shouldn't be passing in '' to localize_file_path() either, since
that's not a valid path. We only need to localize the keys anyway, not
the values.
I'll apply the following patch too, in addition to yours.
-Ken
--- t/manifypods.t 11 Oct 2003 02:39:57 -0000 1.6
+++ t/manifypods.t 17 Oct 2003 00:52:26 -0000
@@ -39,7 +39,8 @@
'script' => '',
'lib/Sample/NoPod.pm' => '',
);
-$_ = $m->localize_file_path($_) foreach %distro;
+# foreach(keys %foo) doesn't give proper lvalues on 5.005, so we use
the ugly way
+%distro = map {$m->localize_file_path($_), $distro{$_}} keys %distro;
$m->dispatch('build');
|