in reply to Re: Re: Error Handling Misconception
in thread Error Handling Misconception
works for me:
Produces:my $object = new wierd; my $value = eval { $object->next_value() }; if ($@) { print "BLAH!\n$@\BLAH!\n"; } print $value, "\n"; package wierd; sub new { bless {}, shift} sub next_value { die "badness"; }
BLAH! badness at ./tstprog.pl line 13. BLAH!
Are you sure you're in a situation where you can see what's printed? What happens when the routine works and $value is something printable?
--Bob Niederman, http://bob-n.comAll code given here is UNTESTED unless otherwise stated.
|
|---|