From 1fb20b77818a10b9e91d751d7e7b4f8a2d339504 Mon Sep 17 00:00:00 2001 From: "Philippe Bruhat (BooK)" Date: Wed, 27 Mar 2019 09:00:24 +0100 Subject: [PATCH] Document a way to perform `use Module VERSION LIST` on the command-line The `split(/,/,q{foo,bar})` seems to still happen. This is the currently documented case: $ perl -MO=Deparse '-MList::Util=any,all' -e1 use List::Util (split(/,/, 'any,all', 0)); '???'; -e syntax OK And these work too (and the split on comma also happens somehow): $ perl -MO=Deparse '-MList::Util any,all' -e1 use List::Util ('any', 'all'); '???'; -e syntax OK $ perl -MO=Deparse '-MList::Util 1.5' -e1 use List::Util 1.5; '???'; -e syntax OK $ perl -MO=Deparse '-MList::Util 1.5 any,all' -e1 use List::Util 1.5 ('any', 'all'); '???'; -e syntax OK --- pod/perlrun.pod | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pod/perlrun.pod b/pod/perlrun.pod index f3b8c860d917..bc2632099e87 100644 --- a/pod/perlrun.pod +++ b/pod/perlrun.pod @@ -698,6 +698,11 @@ is that B<-MI=number> never does a version check, unless C::import()> itself is set up to do a version check, which could happen for example if I inherits from L. +However, it should be noted that since the syntax C<'-MI'> +shown above will generate C, it's possible +to do a version check using C<'-MI'>, which will +generate C. + =item B<-n> X<-n>