develooper Front page | perl.perl5.porters | Postings from January 2011

Exception objects in BEGIN, UNITCHECK etc?

Thread Next
From:
Torsten Förtsch
Date:
January 15, 2011 10:27
Subject:
Exception objects in BEGIN, UNITCHECK etc?
Message ID:
201101151926.55637.torsten.foertsch@gmx.net
Hi,

$ perl -le 'eval q/BEGIN {die \"huhu"}/; print ref($@)?${$@}:$@'
SCALAR(0x6267b0)BEGIN failed--compilation aborted at (eval 1) line 1.

$ perl -le 'eval q/UNITCHECK {die \"huhu"}/; print ref($@)?${$@}:$@'
SCALAR(0x6267c0)UNITCHECK failed--call queue aborted.

That seems to be a bug. I'd expect the string "huhu\n" in both cases.

Torsten Förtsch

-- 
Need professional modperl support? Hire me! (http://foertsch.name)

Like fantasy? http://kabatinte.net

Thread Next


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