Ali
Ali

Reputation: 337

Switch has been removed from the Perl 5.14? what should I do?

Is there any way to run scripts that includes switch statement with Perl 5.14? I have many scripts that use switch statement, I do not want to run them on other perl's version. What should I do?

Upvotes: 1

Views: 2652

Answers (3)

brian d foy
brian d foy

Reputation: 132858

I think you should rewrite the code that uses the deprecated and unsupported code and run everything else on an older perl until you've finished that. You can install the deprecated and unsupported module on a supported perl, but there's no guarantee that it's tricks will work anymore.

Upvotes: 3

JRFerguson
JRFerguson

Reputation: 7526

Prior to 5.10 there was a Switch module. This is deprecated at 5.10 and replaced by a given-when syntax. This FAQ describes it well.

The Switch module appeared in the core in 5.7.3 but was removed in 5.13.1

Upvotes: 7

mpeters
mpeters

Reputation: 4778

Switch has been deprecated and dropped from the standard distribution, but you can still install it yourself from CPAN.

Upvotes: 7

Related Questions