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

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

From:
James E Keenan via RT
Date:
September 30, 2017 22:47
Subject:
[perl #131518] [PATCH] -mpragma (eg strict) fail silent blindsiding
Message ID:
rt-4.0.24-6440-1506811638-212.131518-15-0@perl.org
On Tue, 06 Jun 2017 14:44:56 GMT, ronaldxs wrote:
> This is a bug report for perl from ronaldxs@software-path.com,
> 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 (jkeenan@cpan.org)

---
via perlbug:  queue: perl5 status: new
https://rt.perl.org/Ticket/Display.html?id=131518



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About