develooper Front page | perl.perl5.porters | Postings from September 2017

[perl #131518] [PATCH] -mpragma (eg strict) fail silent blindsiding

James E Keenan via RT
September 30, 2017 22:47
[perl #131518] [PATCH] -mpragma (eg strict) fail silent blindsiding
Message ID:
On Tue, 06 Jun 2017 14:44:56 GMT, ronaldxs wrote:
> This is a bug report for perl from,
> generated with the help of perlbug 1.40 running under perl 5.26.0.
> -----------------------------------------------------------------
> [Please describe your issue here]
> document -mpragma (eg strict) fail silent
> "perl -Mstrict" is used all the time and I noticed that "perl
> -mstrict"
> (lower case -m) runs without "strict" being in effect.  It seems to
> me to be a potentially dangerous surprise and while the docs note that
> "-m" uses an empty import list it also seems to currently take a
> little
> too much expertise and digging to understand the effect of the empty
> import list on pragma(ta|s).
> 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.  This patch to perlrun.pod is a proposed remedy.

I think your argument is correct and the patch should be applied.  However, I think something is amiss in the syntax of this part:

... prevents the call to import usually used by a pragma set active and other status for the current scope

Something about "set active and other status" doesn't sound right.  Can you clarify?

Thank you very much.

James E Keenan (

via perlbug:  queue: perl5 status: new Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About