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

Re: deprecating Switch.pm

Thread Previous | Thread Next
From:
Steffen Mueller
Date:
February 24, 2009 00:50
Subject:
Re: deprecating Switch.pm
Message ID:
49A3111C.2060406@sneakemail.com
Hi Nicholas,

Nicholas Clark wrote:
>     Add deprecate.pm. Deprecate shipping Switch.pm in the core distribution.

Yay!

> 3: Fix the bit of the code that is commented as "fragile"

What's wrong with the following change that fixes 1/2 of the fragility?

Make the ugly line

use if $] >= 5.011, 'deprecate';

become the ugly line

BEGIN { if ($] >= 5.11) { require deprecate; deprecate->import(); } }

which does the same without additional call stacks. And reads more
easily (to me), too.

Best regards,
Steffen

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