develooper Front page | perl.perl5.porters | Postings from October 1999

Re: croak in a tied method doesn't like eval

From:
Nick Ing-Simmons
Date:
October 1, 1999 03:50
Subject:
Re: croak in a tied method doesn't like eval
Message ID:
199910011049.LAA17237@tiuk.ti.com
Paul Marquess <paul.marquess@bt.com> writes:
>When I run the script below with 5.005_58 or greater I get this 
>
>    panic: POPSTACK
>
>Older versions of Perl work fine and changing the croak to a die fixes the
>problem.

New face of a known problem? 
eval (e.g. the require inside new Carp.pm)
interracts baddly with stack-swaps (i.e. that done for the magic of STORE).


>
>Paul
>
>
>package TiedHash ;
>use Carp ;
>
>sub TIEHASH  { bless {}, $_[0] }
>sub STORE    { croak "abcd" }
>
>package main ;
>
>tie %h, TiedHash ;
>eval { $h{1} = 2 } ;
-- 
Nick Ing-Simmons <nik@tiuk.ti.com>
Via, but not speaking for: Texas Instruments Ltd.




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