Skip Menu |
 

This queue is for tickets about the Term-ANSIColor CPAN distribution.

Report information
The Basics
Id: 74639
Status: resolved
Priority: 0/
Queue: Term-ANSIColor

People
Owner: Nobody in particular
Requestors: simonw [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 3.01
Fixed in: 3.02



Subject: Constants eat $@
Download (untitled) / with headers
text/plain 453b
we were doing something like my $val = eval { some_call }; if ($@) { print BOLD, RED, "Error: ", RESET, $@,"\n"; } else { print "Value = $val\n"; } and couldn't understand why errors wouldn't come through. We eventually realised that they would come through but only on the second time which eventually led us to realising that you had an eval in AUTOLOAD which was eating our $@ Could you either document that or preserve the $@ in AUTOLOAD?
Subject: Re: [rt.cpan.org #74639] Constants eat $@
Date: Sun, 18 Mar 2012 14:46:41 -0700
To: bug-Term-ANSIColor [...] rt.cpan.org
From: Russ Allbery <rra [...] stanford.edu>
Download (untitled) / with headers
text/plain 680b
"Simon Wistow via RT" <bug-Term-ANSIColor@rt.cpan.org> writes: Show quoted text
> we were doing something like
Show quoted text
> my $val = eval { some_call }; > if ($@) { > print BOLD, RED, "Error: ", RESET, $@,"\n"; > } else { > print "Value = $val\n"; > }
Show quoted text
> and couldn't understand why errors wouldn't come through.
Show quoted text
> We eventually realised that they would come through but only on the > second time which eventually led us to realising that you had an eval in > AUTOLOAD which was eating our $@
Oh, indeed, good catch. This is now fixed in the just-released 3.02, which should be showing up on CPAN shortly. Thank you! -- Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.