Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: RFC: Version::Easy

by LanX (Saint)
on Jul 12, 2020 at 13:20 UTC ( [id://11119209]=note: print w/replies, xml ) Need Help??


in reply to Re: RFC: Version::Easy
in thread RFC: Version::Easy

Like I already said and Toby explained, backwards compatibility to static parsers is a crucial issue here, and

version->declare('VERSION_GOES_HERE')

would become just another tribal knowledge.

You'll find $VERSION also documented in hundreds of places, fixing old documentation is one of Perl's biggest mortgages.

Furthermore could "Version::Easy" be easily bundled into one master module to rule ehm use them all, hence simplifying boilerplates.

Compare Modern::Perl.

Of course a built-in feature

vers v1.2.3;

might be more elegant, but this could easily be introduced later on top of this semantics once the tool chain is modernized.

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

Replies are listed 'Best First'.
Re^3: RFC: Version::Easy
by tobyink (Canon) on Jul 14, 2020 at 19:53 UTC

    There's already a built-in version syntax from Perl 5.14 onwards.

    package Foo::Bar 1.23; ...; # or package Foo::Bar 1.23 { ...; }

    And the PAUSE indexer, etc supports it. It's only a problem if you need to support Perl versions earlier than 5.14.

      > There's already a built-in version syntax from Perl 5.14 onwards.

      package Foo::Bar 1.23;

      from package

      > If VERSION is provided, package sets the $VERSION variable in the given namespace to a version object with the VERSION provided.

      (emphasize added)

      so apparently I've just implemented the same semantic for older versions

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      Wikisyntax for the Monastery

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11119209]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (2)
As of 2024-04-19 21:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found