Re: [Module::Build] win32 install problem
Status: Beta
Brought to you by:
kwilliams
|
From: demerphq <dem...@gm...> - 2006-05-16 14:06:36
|
On 5/16/06, Ben Lavender <bla...@gm...> wrote:
> On 5/16/06, Randy W. Sims <ml...@th...> wrote:
> > Sorry to take so long to look at this. I haven't yet been able to
> > reproduce the problem. The problem seems to be that a directory name is
> > getting corrupted somewhere. Eg. In this line from above:
> >
> > mkdir blib\binhtml\bin\C:.:
> > Invalid argument at lib/Module/Build/Base.pm line 25
> >
> > The trailing 'C:.' does not belong there.
> >
> > It'd be useful to see what values are in $path and @dirs if you are abl=
e
> > to apply the following patch:
> >
> > --- Base.pm.orig 2006-04-28 00:14:03.000000000 -0400
> > +++ Base.pm 2006-05-15 20:37:05.796875000 -0400
> > @@ -2519,6 +2519,9 @@
> > my @dirs =3D File::Spec->splitdir( File::Spec->canonpath( $path )=
);
> > pop( @dirs ) if $dirs[-1] eq File::Spec->curdir;
...
> > It'd also be useful to know if this happens in a directory without
> > spaces, and if it happens after upgrading File::Spec[1]
>
> The patch provides the same result, in directories both with and without =
spaces:
>
> $name =3D 'config_data';
> $path =3D 'C:.\\';
> $dirs =3D [
> 'C:.'
> ];
>
> A directory without spaces gives the same result.
>
> As before, upgrading File::Spec is something I might try and live
> without. I'd need to investigate what other multitude of packages I'm
> using might be affected by that upgrade; I'll try and do some of that
> today.
Im pretty sure that the lines
my ($name, $path) =3D File::Basename::fileparse($pods->{$pod},
=09=09=09=09=09=09 qr{\.(?:pm|plx?|pod)$});
my @dirs =3D File::Spec->splitdir( File::Spec->canonpath( $path ) );
are wrong. FS->splitdir() splits a directory specification NOT a path.
If you use splitdir on a path that includes a volume specification
then obviously it wont work out (actually it will return the volume as
tho it was a directory)
I think you need something like:
my $spec=3DFile::Spec->canonpath( $pods->{$pod} );
my ($vol,$path,$file)=3D File::Spec->splitpath($spec);
my ($name) =3D File::Basename::fileparse($file,qr{\.(?:pm|plx?|pod)$});
my @dirs =3D File::Spec->splitdir( $path );
pop( @dirs ) if $dirs[-1] eq File::Spec->curdir;
Cheers,
Yves
--=20
perl -Mre=3Ddebug -e "/just|another|perl|hacker/"
|