When was the -P option removed from perl?

The -P option was deprecated in perl 5.10.0 (December 2007) and removed in perl 5.12.0 (April 2010).


I often wonder about these questions when I'm writing about some Perl feature. Since I have most Perls installed, I can look at the right files from each version to discover when it disappears. Command-line switches show up in perlrun, so I can look back at the each perlrun until I find where the switch disappears.

I don't need to have all those Perls installed though. The Perl source is in GitHub, so you can look at the history of the perlrun file to find the change (and here it is where you might start: "Remove the -P switch" - 4c84d7).

The perldelta page also lists the changes for that version (and older versions' perldelta get moved to a versioned form, such as perl5100delta). That's a bit more tedious to go through, especially since you can't bisect it.

Beyond that, Perl 5 Porters will deprecate a feature for two major versions (such as v5.28 and v5.30) before it's actually removed. Back in v5.10 the policy wasn't quite there yet, so that removal was a bit fast.

The curious thing now is that many things were deprecated in v5.000, and Perl 5 Porters are now removing those long-deprecated features.

Tags:

Perl