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

Re: deprecating Switch.pm

Thread Previous | Thread Next
From:
Aristotle Pagaltzis
Date:
February 26, 2009 19:41
Subject:
Re: deprecating Switch.pm
Message ID:
20090227034039.GB30556@klangraum.plasmasturm.org
* Steffen Mueller <nj88udd02@sneakemail.com> [2009-02-24 09:55]:
> BEGIN { if ($] >= 5.11) { require deprecate; deprecate->import(); } }
>
> which does the same without additional call stacks. And reads
> more easily (to me), too.

BEGIN { eval 'use deprecate' if $] >= 5.11 }

There is an extra stack frame here but it should be of no concern.

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>

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