develooper Front page | perl.perl5.porters | Postings from July 2009

Re: Coring Variable::Magic / autodie fights with string eval in Perl5.10.x

Thread Previous | Thread Next
From:
Paul Fenwick
Date:
July 5, 2009 06:02
Subject:
Re: Coring Variable::Magic / autodie fights with string eval in Perl5.10.x
Message ID:
4A50A42C.3050009@perltraining.com.au
Aristotle Pagaltzis wrote:

> I’m actually more worried about the existing reliance of autodie
> on the contents of %^H getting stringified and thereby triggering
> garbage collection. That smacks overwhelmingly strongly of an
> accidental feature of the `my $foo if 0` calibre. Is that really
> something people should be relying on as an interface contract?!

At the moment, quite a lot of code on the CPAN relies upon this as an
interface contract, including autobox, autodie, namespace::clean, and
everything (19 dists) listed at:

	http://cpants.perl.org/dist/used_by/B-Hooks-EndOfScope

So regardless of whether or not %^H triggering object destruction was an
accidental or intentional feature, it's now being depended upon by a lot of
code, including Catalyst::Runtime.

	Paul

-- 
Paul Fenwick <pjf@perltraining.com.au> | http://perltraining.com.au/
Director of Training                   | Ph:  +61 3 9354 6001
Perl Training Australia                | Fax: +61 3 9354 2681

Thread Previous | 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