Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I see that you can use no feature X to shut off new feature $X within a given lexical scope.
I also see that strict and warnings operate as sort-of a sledgehammer to limit various dangerous or unsavory practices.
But is there any way to use the feature pragma to shut off deprecated or otherwise undesirable language features?
For example, suppose you want compilation of a file to fail if your project's code contains bareword filehandles, 2-arg open, pseudohashes, restricted hashes, indirect object syntax, etc. Is there any way to just shut those things off with a no feature pragma?
I may have seen a talk given about this somewhere... Maybe given by the last pumpking. As a way of allowing users to selectively and gradually deprecate various bits in an effort to help users bring their old codebases into the 20th century. Does anyone have a link to this talk? Has there been progress in this direction?
Thanks.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Is there any way to shut off deprecated, dangerous, dilapidated, or otherwise undesirable language features?
by davido (Cardinal) on Aug 14, 2012 at 16:15 UTC | |
by Anonymous Monk on Aug 14, 2012 at 16:42 UTC | |
by locked_user sundialsvc4 (Abbot) on Aug 14, 2012 at 17:19 UTC | |
|
Re: Is there any way to shut off deprecated, dangerous, dilapidated, or otherwise undesirable language features?
by daxim (Curate) on Aug 14, 2012 at 17:00 UTC | |
|
Re: Is there any way to shut off deprecated, dangerous, dilapidated, or otherwise undesirable language features?
by tobyink (Canon) on Aug 19, 2012 at 08:39 UTC |