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

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

Gurusamy Sarathy
September 30, 1999 14:17
Re: croak in a tied method doesn't like eval
Message ID:
On Thu, 30 Sep 1999 21:06:20 BST, 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.

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

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