Comments (3)
No, the stricture flags are the important bit, it avoids loading the .pm files because they are unnecessary overhead in that instance.
from perl5.
I thought specifying
use 5.12;
or higher would behave likeuse strict;
("... strictures are enabled lexically as with use strict.").
Yes.
But the last sentence in the paragraph warns me that strict.pm is then not loaded ... as it would be when using
use strict;?
Yes.
So the correct thing to do, even at version 5.35.0 or later, would still be:
use v5.35.0; use strict; use warnings;
... to ensure that strictures and warnings are enabled and the *.pm's are loaded?
Depends on whether you need the *.pm files to be loaded. Normally you don't, which is why use v5.36
is enough (it enables warnings and strictures).
Additionally loading strict.pm
is pointless: It has no other API or functionality other than to enable strictures.
You might need to load warnings.pm
to configure how warnings are handled or to define your own custom warnings category, but the common case of just enabling all warnings (as with use warnings;
) can also be done with a use VERSION
declaration.
from perl5.
Clarified in #22254
from perl5.
Related Issues (20)
- [doc] perlfunc our section block unclear HOT 1
- [doc] perlfunc pack snippet has different output HOT 1
- Missing support for undef in for_list assignments HOT 6
- BBC: c844eac triggers failures in Devel::Cover HOT 1
- "@" symbol in directory path results in syntax error in Config_heavy.pl HOT 5
- FreeBSD/arm64: POSIX/t/math.t fails with -Duselongdouble HOT 4
- inconsistent behavior of dup open w/ barewords under `use strict` HOT 1
- 5.40.0 onwards won't build Darwin fat binaries HOT 17
- Segmentation fault in Perl_csighandler3 when used XS with threads. HOT 10
- BBC: Blead Breaks File::Tabular HOT 10
- feature 'class': out of memory error if subclassing a class with an explicit new HOT 3
- t/op/try.t: one test fails during deparsing tests HOT 3
- strftime crashes with a blessed format HOT 3
- [doc] Bug in Perl Threads tutorial section "A Thread Pitfall: Deadlocks"
- BBC: Blead Breaks Mojolicious HOT 3
- Cross compilation HOT 2
- BBC: Blead Breaks CPAN HOT 4
- Class methods can still be replaced outside the class HOT 10
- BBC: Blead Breaks DBIx::Class HOT 2
- Extensive CPAN breakage from two code removal projects HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from perl5.