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

Re: deprecating

Thread Previous | Thread Next
Steffen Mueller
February 24, 2009 00:50
Re: deprecating
Message ID:
Hi Nicholas,

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


> 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,

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About