in reply to Re: 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?
The current running Perl version is at $^V (or $]). But how about the minimum Perl version that is currently requested via 'use VERSION'?
% perl -e'use 5.014; say $^V'; # -> prints v5.18.2, but I also want to get v5.14.0 via something
An example use case: my module Data::Sah generates Perl code. It'd be nice if Data::Sah can adjust the kind of Perl code it outputs automatically via detecting the minimum Perl version that the user requests (and not the running Perl interpreter version). This means, even when running under Perl 5.18.2, Data::Sah won't emit code that uses s///r if the user code only says 'use 5.010' and not 'use 5.14' or 'use 5.18'.
I can of course add a configuration to Data::Sah for this, but I'm aiming for a nice default value.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Exposing minimum required perl version ('use x.y.z') to Perl code during runtime?
by tobyink (Canon) on Apr 01, 2014 at 12:08 UTC | |
by sedusedan (Pilgrim) on Apr 01, 2014 at 12:33 UTC | |
by tobyink (Canon) on Apr 01, 2014 at 18:10 UTC | |
by ikegami (Patriarch) on Apr 01, 2014 at 14:14 UTC |