Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
[PATCH] -mpragma (eg strict) fail silent blindsiding #15998
Created by email@example.com
document -mpragma (eg strict) fail silent
"perl -Mstrict" is used all the time and I noticed that "perl -mstrict"
A programmer using Perl should not need to know how to write a custom
From b85ff045c4480eca8989420062c698a819c47105 Mon Sep 17 00:00:00 2001 From: Ronald Schmidt <firstname.lastname@example.org> Date: Mon, 29 May 2017 14:41:49 -0400 Subject: [PATCH] perlrun: warn on -mpragma (eg strict) blindsiding A programmer using Perl should not need to know how to write a custom pragma to understand that -mstrict does not work because of the empty import list. --- pod/perlrun.pod | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pod/perlrun.pod b/pod/perlrun.pod index dff9f71..5edeb35 100644 --- a/pod/perlrun.pod +++ b/pod/perlrun.pod @@ -685,6 +685,11 @@ A consequence of this is that B<-MI<MODULE>=number> never does a version check, unless C<I<MODULE>::import()> itself is set up to do a version check, which could happen for example if I<MODULE> inherits from L<Exporter>. +Lowercase B<-m> should not be expected to work for a pragma (eg C<strict>) +since the empty import list - C<()> - prevents the call to import usually used +by a pragma set active and other status for the current scope. See +L<perlpragma>. + =item B<-n> X<-n> -- 1.9.1
On Tue, 06 Jun 2017 14:44:56 GMT, ronaldxs wrote:
I think your argument is correct and the patch should be applied. However, I think something is amiss in the syntax of this part:
Something about "set active and other status" doesn't sound right. Can you clarify?
Thank you very much.
Thank you for filing this report. You have helped make Perl better.
With the release yesterday of Perl 5.28.0, this and 185 other issues have been
Perl 5.28.0 may be downloaded via:
If you find that the problem persists, feel free to reopen this ticket.