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

Re: [Module::Build] Re: Cwd::cwd() bug??? on Cygwin

Thread Previous | Thread Next
Yitzchak Scott-Thoennes
November 21, 2003 13:21
Re: [Module::Build] Re: Cwd::cwd() bug??? on Cygwin
Message ID:
On Fri, Nov 21, 2003 at 06:21:51AM -0500, "Randy W. Sims" <> wrote:
> >>>#
> >>>package MyModule;
> >>>use Module;
> >>>use base 'Module';
> >>>use Cwd;
> >
> >
> >If you moved that above the use Module line then when 
> >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'.

If your class provides a method foo(), it is reasonable to tell those who
subclass that defining a sub foo or importing one from elsewhere
into their class will override the base method foo().   

> 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...

use Cwd (); ??

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About