Primary Syntax Resource

Is there a resource on the Internet that I can look at to find the syntax of a specific language of the perl version (5.8.1 vs current_stable) without having to switch to perldoc and switch between versions, then look for the language element that I am looking for in the selected version?

It just looks like a shitty way, and I thought I'd ask the hive to see if it was better.

For example, if I am looking for a "say", I would like to know that it appeared in perl 5.10 +.

Thanks.

edit-- As a side note, the reason I look is often that I have to maintain older versions of perl that I β€œcan't” upgrade, but still need to write code. This becomes a tedious task when some things do not work as expected, starting from 5.12 + to 5.8, and I just hoped to find a better way (and I decided that I could not be the only one in this situation).

edit-- I basically searched all in one help area, ideally accessible over the Internet. Press say and find out that it is available in version 5.10 when a function is turned on, or that some functions have learned how to accept different arguments in version Z, etc. In many languages, if you go to view the main class / lib / module you will find the whole version history for your arguments, methods, functions, etc. As for utilities and modules, perlver looks beautiful, as well.

+6
source share
4 answers

Another not so pleasant way is to go through the delta: http://perldoc.perl.org/index-history.html You can always try to find them:

grep say perl*delta.pod 

But yes, it is not nice and easy.

+4
source

The only version-specific keywords are documented on the feature doc page:

 perldoc feature 

Individual keywords are also mentioned when they were added; perldoc -f say includes the following:

This keyword is only available when the say function is enabled; see the feature. Alternatively, include "using v5.10" or a later scope.

This is really a very short list, anyway. Almost everything that works in 5.14 also works in 5.6.

+1
source

Probably the easiest way is to select the specific version of perl that you want to get from CPAN and read its perlsyn documentation perlsyn . For instance:

http://perldoc.perl.org/perlsyn.html

http://perldoc.perl.org/5.8.8/perlsyn.html

0
source

Each perl release includes a perlXXXdelta document explaining the changes made, and since new features (theoretically, finally) not introduced in earlier versions of versions, you should just read perl5160delta , perl514delta , perl512delta , perl510delta and perl58delta ...

In any case, you are right, it would be nice to have a document containing important changes and versions in which they were presented.

0
source

Source: https://habr.com/ru/post/918129/


All Articles