(This assumes $VERSION and $XS_VERSION have already been declared if not, simply add our to the first two lines. The Perl for MS Windows, free of charge Perl is a programming language suitable for writing simple scripts as well as complex. $XS_VERSION = $VERSION # only needed if you have XS code perlmodstyle provides the correct incantation:įollowing idiom is recommended: $VERSION = "1.12_01" The correct way to declare a version number is simple, unless you have an XS component or a alpha/beta indicator (_ in the version number), since then some things need to see a version string and some things a version number. They offer no advantage over a simple numeric version, since they must for compatibility be treated as just a number in many places (e.g. These are not fully supported throughout all the toolchain (regardless of what others may say) and should not be used. Most of your confusion is, I suspect, due to the page you linked advocating 1.2.3 style version "numbers". Dist::Zilla makes it easy to make trial releases.Ī string containing a floating point number will work with all versions of Perl, all versions of MakeMaker & Module::Build, and all Linux distributions I'm aware of. This tells CPAN to list it as a development release, just as if it contained an underscore. Replaces the core version code for all Perl releases from 5.10.0 onwards. alpha or beta) release, append the string -TRIAL to the distribution's version number (e.g. version 0.9929 Object oriented versions for all Perl releases from 5.6.2 onward. This keeps trailing zeros from disappearing. Install perlbrew install perl-5.12.2 perlbrew install perl-5.13.6 List installed versions perlbrew list Use a particular version perlbrew switch perl-5.12.2 perl -v 07-31-2014, 08:36 AM 3: smallpond. is there a command which could give me just the perl version number i.e.: '5.8. Perl Perl Versions As you may notice, the versions of the Perl interpreter itself use the same rules as those for Perl modules. If you need to change the number of digits you use, increment the major version number at the same time.Īlways declare the version as a string. Hi, With the command perl -v i can see the perl version, but it's like a text file. Some (non-Perl) packaging tools think version 1.11 comes after 1.9 but before 1.90. Or, if you need to remain compatible with Perl 5.005 or older: use vars '$VERSION' Īlways use the same number of digits after the decimal point. If your module requires Perl 5.6.0 or later: our $VERSION = '1.02' Leave the multiple-decimal stuff for Perl's version numbers and Perl 6. Declare your version as a string containing a floating point number. I use -j 5 on my quad-core and -j 3 on my dual-core netbook.My position is keep it simple. This macro is substituted by the version of Perl used for building the package, such as 5.8.5. The directory siteperl is now intended for modules installed by a local administrator (see above at perlsitelib). Where N is the number of jobs requested, often the number of cores you have plus one. Until then, the Perl modules were installed below /usr/lib/perl5/siteperl using the macro perlsitearch. Finally if you have multiple cores (and who doesn't these days) you can run perlbrew install -j N perl-5.12.2 Then you will still need to perlbrew install perl-5.12.2 The official perlbrew website is and it suggests installing by running wget -no-check-certificate -O - | bash Perl is just another high level programming language that supports object-oriented, procedural and/or functional programming. Once you do that and make sure Perlbrew's bashrc is loaded into your bashrc, you should be ale to run: perl -v Once installed you can run: perlbrew init After that, you can use the instructions on the perlbrew docs linked above to install it (or use cpan App::perlbrew). On Ubuntu, I think you'll need the build-essential package first, if you don't already. Nowadays, you can use perlbrew to build Perl for you. When writing your own applications, I recommend installing your own Perl.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |