Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

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

by sedusedan (Monk)
on Apr 01, 2014 at 12:33 UTC ( [id://1080545]=note: print w/replies, xml ) Need Help??


in reply to Re^3: 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?

Yeah, I suspect so. Would be nice (for me) if Perl did.

As for 'good default value', I was referring to "the highest Perl version I can use in the user's environment", so picking a globally safe value like 5.8.x is not good enough. Also, I refuse to go lower than 5.10.1 :)

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

Replies are listed 'Best First'.
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

    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
Re^5: Exposing minimum required perl version ('use x.y.z') to Perl code during runtime?
by ikegami (Patriarch) on Apr 01, 2014 at 14:14 UTC
    5.8.8 is still common, as many still use RHEL5.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-04-19 03:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found