develooper Front page | perl.perl5.porters | Postings from August 2009

RE: Smoke [5.11.0] blead-1964-g2adbc9b FAIL(F) MSWin32 Win2000 SP4 (x86/1 cpu)

Thread Previous | Thread Next
From:
Steve Hay
Date:
August 28, 2009 08:11
Subject:
RE: Smoke [5.11.0] blead-1964-g2adbc9b FAIL(F) MSWin32 Win2000 SP4 (x86/1 cpu)
Message ID:
1B32FF956ABF414C9BCE5E487A1497E7041C4109@ukmail02.planit.group
Nicholas Clark wrote on 2009-08-28:
> On Fri, Aug 28, 2009 at 03:44:34PM +0100, Steve Hay wrote:
>> Nicholas Clark wrote on 2009-08-28:
> 
>>> So, somehow, require File::Spec::Functions; or running
>>> File::Spec::Functions::rel2abs() is triggering this. So do they do
>>> dynamic loading somewhere? And why is doing it with a relative path
>>> and then the same relative path made absolute going to upset it?
>> 
>> Yes, File::Spec::Win32::rel2abs() does dynamic loading of Cwd when
>> called with no $base:
>> 
>>     if ( !defined( $base ) || $base eq '' ) {
>>       require Cwd ;
>>       $base = Cwd::getdcwd( ($self->splitpath( $path ))[0] ) if
> defined
>> &Cwd::getdcwd ;
>>       $base = $self->_cwd() unless defined $base ;
>>     }
>>     elsif ( ! $self->file_name_is_absolute( $base ) ) {
>>       $base = $self->rel2abs( $base ) ;
>>     }
>>     else {
>>       $base = $self->canonpath( $base ) ;
>>     }
>> 
>> Hacking TestInit to do:
>> 
>> @new_inc = map { $_ = File::Spec::Functions::rel2abs($_,
>> 'C:/gitclients/perl/ext/DynaLoader'); /(.*)/; $1 }
>> 
>> it now runs okay with the 'A' flag.
>  But it should still be the same (actual) path, and nothing is
changing
> directory here. Hence why I'm really confused, as I would have thought
> that all the C runtime gubbins loading the DLL will be loading it
either
> as ../../lib/$whatever or
> C:/gitclients/perl/ext/DynaLoader/../../lib/$whatever or
> C:/gitclients/perl/lib/$whatever
> 
> Which will all be the same place.
> 
> So when run from the directory C:/gitclients/perl/ext/DynaLoader, what
do
> 
>     File::Spec::Functions::rel2abs($_,
> 'C:/gitclients/perl/ext/DynaLoader');
> 
> and
> 
>     File::Spec::Functions::rel2abs($_);
> 
> generate (for ../../lib and ../../t) ?

C:\gitclients\perl\ext\DynaLoader>..\..\perl -MFile::Spec::Functions -e
"print File::Spec::Functions::rel2abs('../../lib',
'C:/gitclients/perl/ext/DynaLoader')"
C:\gitclients\perl\lib

C:\gitclients\perl\ext\DynaLoader>..\..\perl -MFile::Spec::Functions -e
"print File::Spec::Functions::rel2abs('../../t',
'C:/gitclients/perl/ext/DynaLoader')"
C:\gitclients\perl\t


> 
> Does the world suddenly become a happy place if those two paths are
re-
> written as ..\..\lib and ..\..\t ?

No different:

C:\gitclients\perl\ext\DynaLoader>..\..\perl -MFile::Spec::Functions -e
"print File::Spec::Functions::rel2abs('..\..\lib',
'C:/gitclients/perl/ext/DynaLoader')"
C:\gitclients\perl\lib

C:\gitclients\perl\ext\DynaLoader>..\..\perl -MFile::Spec::Functions -e
"print File::Spec::Functions::rel2abs('..\..\t',
'C:/gitclients/perl/ext/DynaLoader')"
C:\gitclients\perl\t


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About