develooper Front page | perl.perl5.porters | Postings from November 2003

Re: Cwd::cwd() bug??? on Cygwin

Thread Previous | Thread Next
From:
Randy W. Sims
Date:
November 21, 2003 03:31
Subject:
Re: Cwd::cwd() bug??? on Cygwin
Message ID:
3FBDF54F.2080808@ThePierianSpring.org
Nick Ing-Simmons wrote:
> Randy W. Sims <RandyS@ThePierianSpring.org> writes:
> 
>>>sub cwd {
>>>  require Cwd;
>>>  Cwd::cwd;
> 
> 
> If you made that 
>      Cwd::cwd();
> 
> it would work. 

nope. I already tried that.

>>>}
>>>
>>>1;
>>>-----><8-----
>>>
>>>-----><8-----
>>># test.pl
>>>package MyModule;
>>>use Module;
>>>use base 'Module';
>>>use Cwd;
> 
> 
> If you moved that above the use Module line then when Module.pm 
> was compiled it would know Cwd::cwd was a function.

Tried that too. Removing it does work though, but that's not a solution; 
it's not reasonable to tell clients that subclass your library not to 
'use Cwd'.

I'm having a hard time grasping the order in which perl is interpreting 
this. What is desired is that $p->cwd() call Module::cwd() which should 
then forward the call to Cwd::cwd(). But no matter how I rearrange 
things I can't coax the behavior I want.

I'm missing something simple here; I know it...

>>>package main;
>>>MyModule->new;
>>>-----><8-----
>>>



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