Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^5: Exposing minimum required perl version ('use x.y.z') to Perl code during runtime?

by tobyink (Canon)
on Apr 01, 2014 at 18:10 UTC ( [id://1080615]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Exposing minimum required perl version ('use x.y.z') to Perl code during runtime?
in thread Exposing minimum required perl version ('use x.y.z') to Perl code during runtime?

Yes, I know what you meant by a good default value. My point is that as Data::Sah allows the user to generate strings of Perl code, it's reasonable user behaviour to be able to expect to output those strings of code to files, and possibly evaluate those files under a different version of Perl.

So the best default would be to output code which will run on the widest possible range of Perl versions that you're willing to support.

(I do something similar with Type::Tiny which generates code that runs successfully on Perl 5.6.1 through to the latest blead.)

use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name
  • Comment on Re^5: Exposing minimum required perl version ('use x.y.z') to Perl code during runtime?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2026-01-18 00:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (121 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.