develooper Front page | perl.perl5.porters | Postings from March 2000

Re: [ID 20000324.027] Conditionally evaluated subroutines

From:
james
Date:
March 24, 2000 06:48
Subject:
Re: [ID 20000324.027] Conditionally evaluated subroutines
Message ID:
Pine.LNX.4.10.10003241445500.12552-100000@epitome.ebookers.com

> >Named subroutine definitions are not things that may be eval-ed
> >with a block, as the symbol table is changed as soon as the
> >subroutine is compiled.  They are a run-time a nullop.

That explains it.

> 
> He probably doesn't understand that eval{} is just do{} with exception
> handling.   That is, it's a compile thing.
> 

Its not that I don't understand it -- I just thought that its strange
behaviour.  Certainly not what I expected.  Thanks for the explanation
Tom.

--james







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