in reply to Re: effect of Switch module on DATA
in thread effect of Switch module on DATA

It was a core module between 5.7.3 and 5.13.1.

However, it's a source filter, and was thus broken from the start. Its inclusion in core is widely considered to have been an awful, awful mistake.

For what it's worth, use feature 'switch' will also warn on the latest Perls because p5p is planning on making major changes to that feature (or perhaps dropping it entirely) in the near future.

So the choices are: if/elsif/else, dispatch tables, CPAN (Switch, Switch::Plain, etc), or use feature 'switch' while keeping a close eye on development releases of Perl.

use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name"