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

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

From:
Gurusamy Sarathy
Date:
September 30, 1999 14:17
Subject:
Re: croak in a tied method doesn't like eval
Message ID:
199909302122.OAA14120@activestate.com
On Thu, 30 Sep 1999 21:06:20 BST, paul.marquess@bt.com wrote:
>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

Older versions of Perl also have the same problem--what's different
is that Carp::croak() now does a require.

All exceptions thrown within an eval/require/do which is within a callback
called without G_EVAL all have the same problem.  5.005_62-in-waiting has
a partial fix for this already.

>problem.
>
>Paul
>
>
>package TiedHash ;
>use Carp ;
>
>sub TIEHASH  { bless {}, $_[0] }
>sub STORE    { croak "abcd" }
>
>package main ;
>
>tie %h, TiedHash ;
>eval { $h{1} = 2 } ;


Sarathy
gsar@activestate.com



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