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?

$ perl -le " use B::Deparse; use 5.014; print B::Deparse->new->coderef +2text(sub{}) " { use strict; no feature; use feature ':5.12'; }

So there you have it

But you say it doesnt have the use statement, well then

$ perl -le " use B::Deparse; use 5.014; print B::Deparse->new->coderef +2text(sub{ use 5.014; }) " { use strict; no feature; use feature ':5.12'; }

Oh noes its the same thing ... luckily O

$ perl -MO=Deparse -le " use 5.014; " BEGIN { $/ = "\n"; $\ = "\n"; } sub BEGIN { require 5.014; } -e syntax OK

But you say you have to look inside sub O::import ....

Like I said earlier :) extend use feature to support turning-on-and-documenting all these features ... but I don't see introspection as a necessary part of that api , Deparse can take care of that

Good luck

  • Comment on Re^5: Exposing minimum required perl version ('use x.y.z') to Perl code during runtime? ( B::Deparse)
  • Select or Download Code