in reply to Machine-readable Current Version

Using MetaCPAN::Client:

#!/usr/bin/env perl use strict; use warnings; use MetaCPAN::Client; my $mcpan = MetaCPAN::Client->new (); my $perl = $mcpan->module ('perl'); print "Latest stable perl version is " . $perl->version() . "\n";

Not so tricky, really.

Replies are listed 'Best First'.
Re^2: Machine-readable Current Version
by roho (Bishop) on May 14, 2017 at 18:08 UTC
    I wanted to try the MetaCPAN::Client module so I ran cpanm and installed it. That was when I realized how many dependencies it has! This module and its dependencies consumed over 16MB of disk space and took over an hour to install. Please understand I have nothing against this module. I know it has many useful features and I realize these dependencies are needed for it to do all the things it does, but in my opinion it is a bit of overkill just to see the version number. You may want to consider using the $^V system variable to get the current version:
    #!/usr/bin/perl use strict; use warnings; my $version = $^V; print "$version\n";
    Produces the following output: v5.24.1

    "Its not how hard you work, its how much you get done."

      You may want to consider using the $^V system variable to get the current version

      Um, yes, but ...

      ... it returns the version of perl you are currently running, which might be very different from the most recently released Perl. Quoting the original posting:

      is there a site/URL that can be scraped to find what the most recent release is?

      Alexander

      --
      Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

        Yep. My plan is basically to write a prove script that compares the two, and the result gets fed to a web dashboard as a 'pass/fail'.

Re^2: Machine-readable Current Version
by DStaal (Chaplain) on May 10, 2017 at 15:15 UTC

    Perfect, thanks. (I was sure it wasn't tricky - I just wasn't sure where to start looking.

    (And sorry for the late reply - I forgot this site has a two-step 'preview, save' for posting