in reply to Eval and Exiting

Maybe ther is another eval() in $query->redirect()? That would of cause overwrite $@.

I'd recommend to always write an exception catcher like this:

eval { die 1; }; if (my $e = $@) { # <--- secure... warn "Got the exception '$e'!"; exit(0); }

Just a side note: It may not even be the redirect() method that contains the other eval(), it could be the DESTROY() of any variable going out of scope between the die() and the end of the eval. This can be avoided this way:

sub DESTROY { my $self = shift; if ($@) { local $@; return $self->DESTROY(@_); }

...but I don't think that's the case here.

Search, Ask, Know