← Index
NYTProf Performance Profile   « line view »
For ../prof.pl
  Run on Wed Dec 14 15:57:08 2022
Reported on Wed Dec 14 16:00:37 2022

Filename/Users/ether/perl5/perlbrew/perls/36.0/lib/5.36.0/strict.pm
StatementsExecuted 0 statements in 0s
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
226182169831µs831µsstrict::::importstrict::import
909048749µs749µsstrict::::unimportstrict::unimport
0000s0sstrict::::BEGINstrict::BEGIN
0000s0sstrict::::__ANON__[:31]strict::__ANON__[:31]
0000s0sstrict::::__ANON__[:37]strict::__ANON__[:37]
0000s0sstrict::::bitsstrict::bits
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package strict;
2
3$strict::VERSION = "1.12";
4
5my ( %bitmask, %explicit_bitmask );
6
7BEGIN {
8 # Verify that we're called correctly so that strictures will work.
9 # Can't use Carp, since Carp uses us!
10 # see also warnings.pm.
11 die sprintf "Incorrect use of pragma '%s' at %s line %d.\n", __PACKAGE__, +(caller)[1,2]
12 if __FILE__ !~ ( '(?x) \b '.__PACKAGE__.' \.pmc? \z' )
13 && __FILE__ =~ ( '(?x) \b (?i:'.__PACKAGE__.') \.pmc? \z' );
14
15 %bitmask = (
16 refs => 0x00000002,
17 subs => 0x00000200,
18 vars => 0x00000400,
19 );
20
21 %explicit_bitmask = (
22 refs => 0x00000020,
23 subs => 0x00000040,
24 vars => 0x00000080,
25 );
26
27 my $bits = 0;
28 $bits |= $_ for values %bitmask;
29
30 my $inline_all_bits = $bits;
31 *all_bits = sub () { $inline_all_bits };
32
33 $bits = 0;
34 $bits |= $_ for values %explicit_bitmask;
35
36 my $inline_all_explicit_bits = $bits;
37 *all_explicit_bits = sub () { $inline_all_explicit_bits };
38}
39
40sub bits {
41 my $bits = 0;
42 my @wrong;
43 foreach my $s (@_) {
44 if (exists $bitmask{$s}) {
45 $^H |= $explicit_bitmask{$s};
46
47 $bits |= $bitmask{$s};
48 }
49 else {
50 push @wrong, $s;
51 }
52 }
53 if (@wrong) {
54 require Carp;
55 Carp::croak("Unknown 'strict' tag(s) '@wrong'");
56 }
57 $bits;
58}
59
60
# spent 831µs within strict::import which was called 226 times, avg 4µs/call: # 18 times (19µs+0s) by strictures::_enable_2 at line 169 of strictures.pm, avg 1µs/call # 17 times (30µs+0s) by Moo::import at line 46 of Moo.pm, avg 2µs/call # 6 times (56µs+0s) by Mojo::Base::import at line 102 of Mojo/Base.pm, avg 9µs/call # 4 times (8µs+0s) by Role::Tiny::import at line 84 of Role/Tiny.pm, avg 2µs/call # 4 times (6µs+0s) by strictures::_enable_1 at line 139 of strictures.pm, avg 2µs/call # once (50µs+0s) by YAML::PP::Schema::BEGIN@1 at line 1 of YAML/PP/Common.pm # once (29µs+0s) by Tie::Array::BEGIN@4 at line 4 of Tie/Array.pm # once (22µs+0s) by Type::Tiny::BEGIN@4 at line 4 of Type/Tiny.pm # once (19µs+0s) by Types::Standard::Map::BEGIN@6 at line 6 of Types/Standard/Map.pm # once (11µs+0s) by List::MoreUtils::XS::BEGIN@4 at line 4 of List/MoreUtils/XS.pm # once (11µs+0s) by Module::Runtime::BEGIN@1 at line 1 of JSON/Schema/Modern/Vocabulary/Core.pm # once (8µs+0s) by List::MoreUtils::PP::BEGIN@4 at line 4 of List/MoreUtils/PP.pm # once (8µs+0s) by Package::Stash::XS::BEGIN@2 at line 2 of Package/Stash/XS.pm # once (7µs+0s) by Class::Inspector::BEGIN@6 at line 6 of Class/Inspector.pm # once (7µs+0s) by experimental::BEGIN@3 at line 3 of experimental.pm # once (7µs+0s) by JSON::Schema::Modern::Result::BEGIN@1 at line 1 of JSON/Schema/Modern/Annotation.pm # once (6µs+0s) by Params::Util::BEGIN@87 at line 87 of Params/Util.pm # once (6µs+0s) by IO::Uncompress::RawInflate::BEGIN@4 at line 4 of IO/Uncompress/RawInflate.pm # once (6µs+0s) by Method::Generate::BuildAll::BEGIN@2 at line 2 of Method/Generate/BuildAll.pm # once (6µs+0s) by PerlIO::encoding::BEGIN@3 at line 3 of PerlIO/encoding.pm # once (6µs+0s) by base::BEGIN@4 at line 4 of base.pm # once (5µs+0s) by Params::Util::BEGIN@59 at line 59 of Params/Util.pm # once (5µs+0s) by Socket::BEGIN@3 at line 3 of Socket.pm # once (5µs+0s) by vars::BEGIN@8 at line 8 of vars.pm # once (5µs+0s) by Module::Runtime::BEGIN@1.320 at line 1 of JSON/Schema/Modern/Vocabulary/OpenAPI.pm # once (5µs+0s) by YAML::PP::BEGIN@1.282 at line 1 of YAML/PP/Schema/JSON.pm # once (5µs+0s) by B::Hooks::EndOfScope::BEGIN@5 at line 5 of B/Hooks/EndOfScope.pm # once (5µs+0s) by YAML::PP::Dumper::BEGIN@1.294 at line 1 of YAML/PP/Representer.pm # once (5µs+0s) by mro::BEGIN@10 at line 10 of mro.pm # once (5µs+0s) by Module::Runtime::BEGIN@1.318 at line 1 of JSON/Schema/Modern/Vocabulary/MetaData.pm # once (5µs+0s) by Exporter::Tiny::BEGIN@4 at line 4 of Exporter/Tiny.pm # once (5µs+0s) by Method::Generate::Accessor::BEGIN@2 at line 2 of Method/Generate/Accessor.pm # once (5µs+0s) by JSON::Schema::Modern::BEGIN@1.110 at line 1 of JSON/Schema/Modern/Document.pm # once (5µs+0s) by Types::Standard::Dict::BEGIN@6 at line 6 of Types/Standard/Dict.pm # once (5µs+0s) by JSON::Schema::Modern::BEGIN@1.158 at line 1 of JSON/Schema/Modern/Utilities.pm # once (5µs+0s) by IO::Uncompress::Base::BEGIN@4 at line 4 of IO/Uncompress/Base.pm # once (5µs+0s) by Unicode::Normalize::BEGIN@4 at line 4 of Unicode/Normalize.pm # once (5µs+0s) by Type::Tiny::Union::BEGIN@4 at line 4 of Type/Tiny/Union.pm # once (5µs+0s) by Symbol::BEGIN@167 at line 167 of Symbol.pm # once (5µs+0s) by IO::Seekable::BEGIN@99 at line 99 of IO/Seekable.pm # once (5µs+0s) by Pod::Text::BEGIN@18 at line 18 of Pod/Text.pm # once (5µs+0s) by MooX::HandlesVia::BEGIN@4 at line 4 of MooX/HandlesVia.pm # once (4µs+0s) by IO::Compress::Gzip::BEGIN@5 at line 5 of IO/Compress/Gzip.pm # once (4µs+0s) by attributes::BEGIN@9 at line 9 of attributes.pm # once (4µs+0s) by Time::HiRes::BEGIN@4 at line 4 of Time/HiRes.pm # once (4µs+0s) by Type::Tiny::ConstrainedObject::BEGIN@4 at line 4 of Type/Tiny/ConstrainedObject.pm # once (4µs+0s) by Module::Load::BEGIN@1 at line 1 of YAML/PP/Schema/Core.pm # once (4µs+0s) by Type::Tiny::Duck::BEGIN@4 at line 4 of Type/Tiny/Duck.pm # once (4µs+0s) by main::BEGIN@1.2 at line 1 of OpenAPI/Modern.pm # once (4µs+0s) by Moo::_Utils::BEGIN@1.304 at line 1 of JSON/Schema/Modern/Vocabulary.pm # once (4µs+0s) by Type::Library::BEGIN@4 at line 4 of Type/Library.pm # once (4µs+0s) by Module::Runtime::BEGIN@1.312 at line 1 of JSON/Schema/Modern/Vocabulary/FormatAssertion.pm # once (4µs+0s) by Types::Standard::HashRef::BEGIN@6 at line 6 of Types/Standard/HashRef.pm # once (4µs+0s) by Pod::Simple::LinkSection::BEGIN@6 at line 6 of Pod/Simple/LinkSection.pm # once (4µs+0s) by Mojo::Base::BEGIN@3 at line 3 of Mojo/Base.pm # once (4µs+0s) by JSON::PP::IncrParser::BEGIN@1506 at line 1506 of JSON/PP.pm # once (4µs+0s) by List::Util::BEGIN@9 at line 9 of List/Util.pm # once (4µs+0s) by Encode::Alias::BEGIN@2 at line 2 of Encode/Alias.pm # once (4µs+0s) by Types::Standard::ArrayRef::BEGIN@6 at line 6 of Types/Standard/ArrayRef.pm # once (4µs+0s) by YAML::PP::BEGIN@2.284 at line 2 of YAML/PP/Loader.pm # once (4µs+0s) by Moo::sification::BEGIN@2 at line 2 of Moo/sification.pm # once (4µs+0s) by Module::Runtime::BEGIN@1.314 at line 1 of JSON/Schema/Modern/Vocabulary/FormatAnnotation.pm # once (4µs+0s) by Types::Standard::Tuple::BEGIN@6 at line 6 of Types/Standard/Tuple.pm # once (4µs+0s) by Config::BEGIN@9 at line 9 of Config.pm # once (4µs+0s) by YAML::PP::BEGIN@1.292 at line 1 of YAML/PP/Dumper.pm # once (4µs+0s) by IO::Uncompress::Adapter::Inflate::BEGIN@3 at line 3 of IO/Uncompress/Adapter/Inflate.pm # once (4µs+0s) by Moo::Object::BEGIN@2 at line 2 of Moo/Object.pm # once (4µs+0s) by overload::BEGIN@3 at line 3 of overload.pm # once (4µs+0s) by YAML::PP::Dumper::BEGIN@2.296 at line 2 of YAML/PP/Writer.pm # once (4µs+0s) by IO::Compress::Gzip::Constants::BEGIN@3 at line 3 of IO/Compress/Gzip/Constants.pm # once (4µs+0s) by IO::Compress::Zlib::Extra::BEGIN@5 at line 5 of IO/Compress/Zlib/Extra.pm # once (4µs+0s) by YAML::PP::Parser::BEGIN@1.286 at line 1 of YAML/PP/Exception.pm # once (4µs+0s) by Package::Stash::BEGIN@2 at line 2 of Package/Stash.pm # once (4µs+0s) by MooX::TypeTiny::BEGIN@2 at line 2 of MooX/TypeTiny.pm # once (4µs+0s) by Pod::Usage::BEGIN@13 at line 13 of Pod/Usage.pm # once (4µs+0s) by Encode::MIME::Name::BEGIN@2 at line 2 of Encode/MIME/Name.pm # once (4µs+0s) by JSON::Schema::Modern::Vocabulary::Applicator::BEGIN@1.308 at line 1 of JSON/Schema/Modern/Vocabulary/Unevaluated.pm # once (4µs+0s) by JSON::Schema::Modern::Vocabulary::Applicator::BEGIN@1 at line 1 of Sub/Install.pm # once (4µs+0s) by YAML::PP::Parser::BEGIN@2.288 at line 2 of YAML/PP/Reader.pm # once (4µs+0s) by MIME::Base64::BEGIN@3 at line 3 of MIME/Base64.pm # once (4µs+0s) by YAML::PP::Loader::BEGIN@2.290 at line 2 of YAML/PP/Constructor.pm # once (3µs+0s) by YAML::PP::Dumper::BEGIN@1.297 at line 1 of YAML/PP/Writer/File.pm # once (3µs+0s) by YAML::PP::Parser::BEGIN@1 at line 1 of YAML/PP/Lexer.pm # once (3µs+0s) by OpenAPI::Modern::BEGIN@1.241 at line 1 of JSON/Schema/Modern/Document/OpenAPI.pm # once (3µs+0s) by File::Spec::BEGIN@3 at line 3 of File/Spec.pm # once (3µs+0s) by B::Hooks::EndOfScope::XS::BEGIN@4 at line 4 of B/Hooks/EndOfScope/XS.pm # once (3µs+0s) by List::MoreUtils::BEGIN@64 at line 64 of List/MoreUtils.pm # once (3µs+0s) by List::MoreUtils::BEGIN@4 at line 4 of List/MoreUtils.pm # once (3µs+0s) by Module::Runtime::BEGIN@1.310 at line 1 of JSON/Schema/Modern/Vocabulary/Validation.pm # once (3µs+0s) by IO::Uncompress::Gunzip::BEGIN@8 at line 8 of IO/Uncompress/Gunzip.pm # once (3µs+0s) by YAML::PP::Loader::BEGIN@2 at line 2 of YAML/PP/Parser.pm # once (3µs+0s) by Moo::BEGIN@2 at line 2 of Moo.pm # once (3µs+0s) by Method::Generate::Constructor::BEGIN@2 at line 2 of Method/Generate/Constructor.pm # once (3µs+0s) by namespace::clean::BEGIN@4 at line 4 of namespace/clean.pm # once (3µs+0s) by Sub::Exporter::Progressive::BEGIN@3 at line 3 of Sub/Exporter/Progressive.pm # once (3µs+0s) by Digest::MD5::BEGIN@3 at line 3 of Digest/MD5.pm # once (3µs+0s) by Module::Runtime::BEGIN@1.316 at line 1 of JSON/Schema/Modern/Vocabulary/Content.pm # once (3µs+0s) by Sub::Quote::BEGIN@5 at line 5 of Sub/Quote.pm # once (3µs+0s) by Pod::Simple::BEGIN@1521 at line 1521 of Pod/Simple.pm # once (3µs+0s) by Pod::Simple::BEGIN@4 at line 4 of Pod/Simple.pm # once (3µs+0s) by parent::BEGIN@2 at line 2 of parent.pm # once (3µs+0s) by Role::Tiny::BEGIN@2 at line 2 of Role/Tiny.pm # once (3µs+0s) by constant::BEGIN@3 at line 3 of constant.pm # once (3µs+0s) by Config::BEGIN@5 at line 5 of Config_heavy.pl # once (3µs+0s) by Types::TypeTiny::BEGIN@4 at line 4 of Types/TypeTiny.pm # once (3µs+0s) by Data::Dumper::BEGIN@12 at line 12 of Data/Dumper.pm # once (3µs+0s) by URI::Escape::BEGIN@3 at line 3 of URI/Escape.pm # once (3µs+0s) by IO::Compress::Adapter::Deflate::BEGIN@3 at line 3 of IO/Compress/Adapter/Deflate.pm # once (3µs+0s) by Safe::Isa::BEGIN@3 at line 3 of Safe/Isa.pm # once (3µs+0s) by Ref::Util::XS::BEGIN@4 at line 4 of Ref/Util/XS.pm # once (3µs+0s) by IO::File::BEGIN@128 at line 128 of IO/File.pm # once (3µs+0s) by IO::Poll::BEGIN@10 at line 10 of IO/Poll.pm # once (3µs+0s) by Moo::Role::BEGIN@2 at line 2 of Moo/Role.pm # once (3µs+0s) by Type::Tiny::Enum::BEGIN@4 at line 4 of Type/Tiny/Enum.pm # once (3µs+0s) by Module::Runtime::BEGIN@1.306 at line 1 of JSON/Schema/Modern/Vocabulary/Applicator.pm # once (3µs+0s) by version::regex::BEGIN@3 at line 3 of version/regex.pm # once (3µs+0s) by Fcntl::BEGIN@58 at line 58 of Fcntl.pm # once (3µs+0s) by YAML::PP::Dumper::BEGIN@1 at line 1 of YAML/PP/Emitter.pm # once (3µs+0s) by Eval::TypeTiny::BEGIN@3 at line 3 of Eval/TypeTiny.pm # once (3µs+0s) by JSON::Schema::Modern::BEGIN@2 at line 2 of Path/Tiny.pm # once (3µs+0s) by strictures::BEGIN@3 at line 3 of strictures.pm # once (3µs+0s) by IO::Handle::BEGIN@264 at line 264 of IO/Handle.pm # once (3µs+0s) by main::BEGIN@2.280 at line 2 of YAML/PP.pm # once (3µs+0s) by JSON::Schema::Modern::BEGIN@1.81 at line 1 of JSON/Schema/Modern/Result.pm # once (3µs+0s) by IO::BEGIN@7 at line 7 of IO.pm # once (3µs+0s) by namespace::clean::_Util::BEGIN@13 at line 13 of namespace/clean/_Util.pm # once (3µs+0s) by Symbol::BEGIN@3 at line 3 of Symbol.pm # once (3µs+0s) by Sub::Defer::BEGIN@2 at line 2 of Sub/Defer.pm # once (3µs+0s) by YAML::PP::BEGIN@1 at line 1 of YAML/PP/Schema.pm # once (3µs+0s) by JSON::Schema::Modern::BEGIN@1.66 at line 1 of JSON/Schema/Modern/Error.pm # once (3µs+0s) by Params::Util::PP::BEGIN@3 at line 3 of Params/Util/PP.pm # once (3µs+0s) by YAML::PP::Parser::BEGIN@2 at line 2 of YAML/PP/Render.pm # once (3µs+0s) by main::BEGIN@1 at line 1 of /Users/ether/git/fastly/Heavenly/profiling/jsm-0.556-om-0.034/../prof.pl # once (2µs+0s) by Module::Load::BEGIN@3 at line 3 of Module/Load.pm # once (2µs+0s) by Exporter::BEGIN@3 at line 3 of Exporter.pm # once (2µs+0s) by Pod::Escapes::BEGIN@2 at line 2 of Pod/Escapes.pm # once (2µs+0s) by Pod::Simple::BEGIN@2 at line 2 of Pod/Simple/TiedOutFH.pm # once (2µs+0s) by List::MoreUtils::BEGIN@134 at line 134 of List/MoreUtils.pm # once (2µs+0s) by IO::Compress::Base::BEGIN@6 at line 6 of IO/Compress/Base.pm # once (2µs+0s) by Digest::base::BEGIN@3 at line 3 of Digest/base.pm # once (2µs+0s) by Types::Standard::BEGIN@4 at line 4 of Types/Standard.pm # once (2µs+0s) by Role::Tiny::With::BEGIN@3 at line 3 of Role/Tiny/With.pm # once (2µs+0s) by version::BEGIN@5 at line 5 of version.pm # once (2µs+0s) by Carp::BEGIN@4 at line 4 of Carp.pm # once (2µs+0s) by IO::Compress::RawDeflate::BEGIN@5 at line 5 of IO/Compress/RawDeflate.pm # once (2µs+0s) by Module::Implementation::BEGIN@5 at line 5 of Module/Implementation.pm # once (2µs+0s) by IO::Compress::Base::Common::BEGIN@3 at line 3 of IO/Compress/Base/Common.pm # once (2µs+0s) by JSON::PP::BEGIN@6 at line 6 of JSON/PP.pm # once (2µs+0s) by Exporter::Heavy::BEGIN@3 at line 3 of Exporter/Heavy.pm # once (2µs+0s) by File::ShareDir::BEGIN@121 at line 121 of File/ShareDir.pm # once (2µs+0s) by bytes::BEGIN@3 at line 3 of bytes.pm # once (2µs+0s) by POSIX::BEGIN@2 at line 2 of POSIX.pm # once (2µs+0s) by re::BEGIN@4 at line 4 of re.pm # once (2µs+0s) by Ref::Util::BEGIN@4 at line 4 of Ref/Util.pm # once (2µs+0s) by JSON::MaybeXS::BEGIN@3 at line 3 of JSON/MaybeXS.pm # once (2µs+0s) by if::BEGIN@2 at line 2 of if.pm # once (2µs+0s) by Compress::Raw::Zlib::BEGIN@8 at line 8 of Compress/Raw/Zlib.pm # once (2µs+0s) by Try::Tiny::BEGIN@7 at line 7 of Try/Tiny.pm # once (2µs+0s) by Moo::_Utils::BEGIN@2 at line 2 of Moo/_Utils.pm # once (2µs+0s) by Variable::Magic::BEGIN@5 at line 5 of Variable/Magic.pm # once (2µs+0s) by OpenAPI::Modern::BEGIN@1 at line 1 of JSON/Schema/Modern.pm # once (2µs+0s) by Digest::SHA::BEGIN@5 at line 5 of Digest/SHA.pm # once (2µs+0s) by Type::Coercion::BEGIN@4 at line 4 of Type/Coercion.pm # once (2µs+0s) by Type::Tiny::Class::BEGIN@4 at line 4 of Type/Tiny/Class.pm # once (2µs+0s) by Encode::BEGIN@5 at line 5 of Encode.pm # once (2µs+0s) by utf8::BEGIN@3 at line 3 of utf8.pm # once (2µs+0s) by YAML::PP::Lexer::BEGIN@1 at line 1 of YAML/PP/Grammar.pm # once (2µs+0s) by Sub::Util::BEGIN@7 at line 7 of Sub/Util.pm # once (2µs+0s) by Encode::Config::BEGIN@7 at line 7 of Encode/Config.pm # once (2µs+0s) by Moo::_Utils::BEGIN@1 at line 1 of Class/Method/Modifiers.pm # once (1µs+0s) by File::Spec::Unix::BEGIN@3 at line 3 of File/Spec/Unix.pm # once (1µs+0s) by Cwd::BEGIN@2 at line 2 of Cwd.pm # once (1µs+0s) by Pod::Simple::BlackBox::BEGIN@22 at line 22 of Pod/Simple/BlackBox.pm # once (1µs+0s) by File::Basename::BEGIN@50 at line 50 of File/Basename.pm # once (1µs+0s) by Sub::Exporter::Progressive::BEGIN@26 at line 26 of Sub/Exporter/Progressive.pm # once (1µs+0s) by JSON::PP::Boolean::BEGIN@3 at line 3 of JSON/PP/Boolean.pm # once (1µs+0s) by Scalar::Util::BEGIN@9 at line 9 of Scalar/Util.pm # once (1µs+0s) by IO::Compress::Base::Common::BEGIN@520 at line 520 of IO/Compress/Base/Common.pm # once (1µs+0s) by File::GlobMapper::BEGIN@3 at line 3 of File/GlobMapper.pm # once (1µs+0s) by Encode::Encoding::BEGIN@4 at line 4 of Encode/Encoding.pm # once (1µs+0s) by File::Glob::BEGIN@3 at line 3 of File/Glob.pm # once (1µs+0s) by Mojo::Util::BEGIN@15 at line 15 of Getopt/Long.pm
sub import {
61 shift;
62 $^H |= @_ ? &bits : all_bits | all_explicit_bits;
63}
64
65
# spent 749µs within strict::unimport which was called 90 times, avg 8µs/call: # once (37µs+0s) by Pod::Simple::BEGIN@1517 at line 1517 of Pod/Simple.pm # once (32µs+0s) by Type::Library::BEGIN@284 at line 284 of Type/Library.pm # once (24µs+0s) by Mojo::Base::BEGIN@133 at line 133 of Mojo/Base.pm # once (24µs+0s) by Params::Util::BEGIN@85 at line 85 of Params/Util.pm # once (21µs+0s) by Moo::_Utils::BEGIN@278 at line 278 of Moo/_Utils.pm # once (19µs+0s) by Moo::BEGIN@70 at line 70 of Moo.pm # once (17µs+0s) by Symbol::BEGIN@103 at line 103 of Symbol.pm # once (16µs+0s) by Moo::_Utils::BEGIN@141 at line 141 of Moo/_Utils.pm # once (13µs+0s) by Sub::Quote::BEGIN@348 at line 348 of Sub/Quote.pm # once (13µs+0s) by Type::Tiny::BEGIN@1435 at line 1435 of Type/Tiny.pm # once (13µs+0s) by List::MoreUtils::PP::BEGIN@870 at line 870 of List/MoreUtils/PP.pm # once (13µs+0s) by Type::Library::BEGIN@188 at line 188 of Type/Library.pm # once (12µs+0s) by Sub::Defer::BEGIN@14 at line 14 of Sub/Defer.pm # once (12µs+0s) by B::BEGIN@268 at line 268 of B.pm # once (12µs+0s) by IO::Handle::BEGIN@609 at line 609 of IO/Handle.pm # once (11µs+0s) by List::MoreUtils::PP::BEGIN@421 at line 421 of List/MoreUtils/PP.pm # once (11µs+0s) by Moo::BEGIN@180 at line 180 of Moo.pm # once (11µs+0s) by Path::Tiny::BEGIN@1613 at line 1613 of Path/Tiny.pm # once (11µs+0s) by Mojo::Util::BEGIN@203 at line 203 of Mojo/Util.pm # once (11µs+0s) by Mojo::Util::BEGIN@532 at line 532 of Mojo/Util.pm # once (11µs+0s) by Exporter::Tiny::BEGIN@69 at line 69 of Exporter/Tiny.pm # once (11µs+0s) by JSON::MaybeXS::BEGIN@32 at line 32 of JSON/MaybeXS.pm # once (10µs+0s) by version::BEGIN@27 at line 27 of version.pm # once (10µs+0s) by File::Spec::Unix::BEGIN@167 at line 167 of File/Spec/Unix.pm # once (10µs+0s) by Cwd::BEGIN@638 at line 638 of Cwd.pm # once (9µs+0s) by Mojo::Base::BEGIN@45 at line 45 of Mojo/Base.pm # once (9µs+0s) by Sub::Install::BEGIN@170 at line 170 of Sub/Install.pm # once (9µs+0s) by Carp::BEGIN@188 at line 188 of Carp.pm # once (9µs+0s) by Carp::BEGIN@730 at line 730 of Carp.pm # once (9µs+0s) by Types::Standard::BEGIN@2 at line 2 of (eval 46)[Types/Standard.pm:48] # once (9µs+0s) by Exporter::Tiny::BEGIN@190 at line 190 of Exporter/Tiny.pm # once (8µs+0s) by MooX::HandlesVia::BEGIN@25 at line 25 of MooX/HandlesVia.pm # once (8µs+0s) by List::MoreUtils::PP::BEGIN@129 at line 129 of List/MoreUtils/PP.pm # once (8µs+0s) by Symbol::BEGIN@137 at line 137 of Symbol.pm # once (8µs+0s) by Socket::BEGIN@842 at line 842 of Socket.pm # once (7µs+0s) by constant::BEGIN@40 at line 40 of constant.pm # once (7µs+0s) by Module::Implementation::BEGIN@128 at line 128 of Module/Implementation.pm # once (7µs+0s) by File::ShareDir::BEGIN@411 at line 411 of File/ShareDir.pm # once (7µs+0s) by Class::Inspector::BEGIN@331 at line 331 of Class/Inspector.pm # once (7µs+0s) by Type::Tiny::BEGIN@71 at line 71 of Type/Tiny.pm # once (7µs+0s) by Role::Tiny::BEGIN@24 at line 24 of Role/Tiny.pm # once (7µs+0s) by Type::Tiny::Class::BEGIN@164 at line 164 of Type/Tiny/Class.pm # once (7µs+0s) by Config::BEGIN@47 at line 47 of Config.pm # once (7µs+0s) by Moo::BEGIN@230 at line 230 of Moo.pm # once (7µs+0s) by Socket::BEGIN@941 at line 941 of Socket.pm # once (7µs+0s) by overload::BEGIN@4 at line 4 of overload.pm # once (7µs+0s) by Exporter::Tiny::BEGIN@253 at line 253 of Exporter/Tiny.pm # once (7µs+0s) by Exporter::Tiny::BEGIN@347 at line 347 of Exporter/Tiny.pm # once (7µs+0s) by Compress::Raw::Zlib::BEGIN@113 at line 113 of Compress/Raw/Zlib.pm # once (6µs+0s) by Types::TypeTiny::BEGIN@68 at line 68 of Types/TypeTiny.pm # once (6µs+0s) by Exporter::Heavy::BEGIN@4 at line 4 of Exporter/Heavy.pm # once (6µs+0s) by Class::Method::Modifiers::BEGIN@54 at line 54 of Class/Method/Modifiers.pm # once (6µs+0s) by Carp::BEGIN@256 at line 256 of Carp.pm # once (6µs+0s) by Type::Library::BEGIN@232 at line 232 of Type/Library.pm # once (6µs+0s) by Type::Library::BEGIN@207 at line 207 of Type/Library.pm # once (6µs+0s) by parent::BEGIN@21 at line 21 of parent.pm # once (6µs+0s) by Sub::Exporter::Progressive::BEGIN@20 at line 20 of Sub/Exporter/Progressive.pm # once (6µs+0s) by Module::Load::BEGIN@14 at line 14 of Module/Load.pm # once (6µs+0s) by Module::Load::BEGIN@89 at line 89 of Module/Load.pm # once (6µs+0s) by Exporter::Tiny::BEGIN@217 at line 217 of Exporter/Tiny.pm # once (6µs+0s) by Time::HiRes::BEGIN@70 at line 70 of Time/HiRes.pm # once (5µs+0s) by List::Util::BEGIN@35 at line 35 of List/Util.pm # once (5µs+0s) by List::MoreUtils::PP::BEGIN@154 at line 154 of List/MoreUtils/PP.pm # once (5µs+0s) by Symbol::BEGIN@156 at line 156 of Symbol.pm # once (5µs+0s) by Type::Library::BEGIN@314 at line 314 of Type/Library.pm # once (5µs+0s) by Moo::BEGIN@275 at line 275 of Moo.pm # once (5µs+0s) by Moo::_Utils::BEGIN@6 at line 6 of Moo/_Utils.pm # once (5µs+0s) by Exporter::BEGIN@4 at line 4 of Exporter.pm # once (5µs+0s) by Ref::Util::BEGIN@25 at line 25 of Ref/Util.pm # once (5µs+0s) by List::MoreUtils::BEGIN@129 at line 129 of List/MoreUtils.pm # once (4µs+0s) by constant::BEGIN@65 at line 65 of constant.pm # once (4µs+0s) by Types::TypeTiny::BEGIN@124 at line 124 of Types/TypeTiny.pm # once (4µs+0s) by Role::Tiny::BEGIN@65 at line 65 of Role/Tiny.pm # once (4µs+0s) by POSIX::BEGIN@225 at line 225 of POSIX.pm # once (4µs+0s) by Exporter::Tiny::BEGIN@396 at line 396 of Exporter/Tiny.pm # once (4µs+0s) by Ref::Util::XS::BEGIN@47 at line 47 of Ref/Util/XS.pm # once (4µs+0s) by List::MoreUtils::BEGIN@54 at line 54 of List/MoreUtils.pm # once (3µs+0s) by Types::TypeTiny::BEGIN@98 at line 98 of Types/TypeTiny.pm # once (3µs+0s) by Class::Method::Modifiers::BEGIN@145 at line 145 of Class/Method/Modifiers.pm # once (3µs+0s) by Class::Method::Modifiers::BEGIN@196 at line 196 of Class/Method/Modifiers.pm # once (3µs+0s) by Class::Inspector::BEGIN@344 at line 344 of Class/Inspector.pm # once (3µs+0s) by List::MoreUtils::PP::BEGIN@179 at line 179 of List/MoreUtils/PP.pm # once (3µs+0s) by Carp::BEGIN@751 at line 751 of Carp.pm # once (3µs+0s) by Role::Tiny::BEGIN@25 at line 25 of Role/Tiny.pm # once (3µs+0s) by Type::Tiny::Class::BEGIN@185 at line 185 of Type/Tiny/Class.pm # once (3µs+0s) by Exporter::Tiny::BEGIN@236 at line 236 of Exporter/Tiny.pm # once (2µs+0s) by constant::BEGIN@141 at line 141 of constant.pm # once (2µs+0s) by constant::BEGIN@90 at line 90 of constant.pm # once (2µs+0s) by Types::TypeTiny::BEGIN@114 at line 114 of Types/TypeTiny.pm # once (2µs+0s) by File::Glob::BEGIN@54 at line 54 of File/Glob.pm
sub unimport {
66 shift;
67
68 if (@_) {
69 $^H &= ~&bits;
70 }
71 else {
72 $^H &= ~all_bits;
73 $^H |= all_explicit_bits;
74 }
75}
76
771;
78__END__
79
80=head1 NAME
81
82strict - Perl pragma to restrict unsafe constructs
83
84=head1 SYNOPSIS
85
86 use strict;
87
88 use strict "vars";
89 use strict "refs";
90 use strict "subs";
91
92 use strict;
93 no strict "vars";
94
95=head1 DESCRIPTION
96
97The C<strict> pragma disables certain Perl expressions that could behave
98unexpectedly or are difficult to debug, turning them into errors. The
99effect of this pragma is limited to the current file or scope block.
100
101If no import list is supplied, all possible restrictions are assumed.
102(This is the safest mode to operate in, but is sometimes too strict for
103casual programming.) Currently, there are three possible things to be
104strict about: "subs", "vars", and "refs".
105
106=over 6
107
108=item C<strict refs>
109
110This generates a runtime error if you
111use symbolic references (see L<perlref>).
112
113 use strict 'refs';
114 $ref = \$foo;
115 print $$ref; # ok
116 $ref = "foo";
117 print $$ref; # runtime error; normally ok
118 $file = "STDOUT";
119 print $file "Hi!"; # error; note: no comma after $file
120
121There is one exception to this rule:
122
123 $bar = \&{'foo'};
124 &$bar;
125
126is allowed so that C<goto &$AUTOLOAD> would not break under stricture.
127
128
129=item C<strict vars>
130
131This generates a compile-time error if you access a variable that was
132neither explicitly declared (using any of C<my>, C<our>, C<state>, or C<use
133vars>) nor fully qualified. (Because this is to avoid variable suicide
134problems and subtle dynamic scoping issues, a merely C<local> variable isn't
135good enough.) See L<perlfunc/my>, L<perlfunc/our>, L<perlfunc/state>,
136L<perlfunc/local>, and L<vars>.
137
138 use strict 'vars';
139 $X::foo = 1; # ok, fully qualified
140 my $foo = 10; # ok, my() var
141 local $baz = 9; # blows up, $baz not declared before
142
143 package Cinna;
144 our $bar; # Declares $bar in current package
145 $bar = 'HgS'; # ok, global declared via pragma
146
147The local() generated a compile-time error because you just touched a global
148name without fully qualifying it.
149
150Because of their special use by sort(), the variables $a and $b are
151exempted from this check.
152
153=item C<strict subs>
154
155This disables the poetry optimization, generating a compile-time error if
156you try to use a bareword identifier that's not a subroutine, unless it
157is a simple identifier (no colons) and that it appears in curly braces,
158on the left hand side of the C<< => >> symbol, or has the unary minus
159operator applied to it.
160
161 use strict 'subs';
162 $SIG{PIPE} = Plumber; # blows up
163 $SIG{PIPE} = "Plumber"; # fine: quoted string is always ok
164 $SIG{PIPE} = \&Plumber; # preferred form
165
166=back
167
168See L<perlmodlib/Pragmatic Modules>.
169
170=head1 HISTORY
171
172C<strict 'subs'>, with Perl 5.6.1, erroneously permitted to use an unquoted
173compound identifier (e.g. C<Foo::Bar>) as a hash key (before C<< => >> or
174inside curlies), but without forcing it always to a literal string.
175
176Starting with Perl 5.8.1 strict is strict about its restrictions:
177if unknown restrictions are used, the strict pragma will abort with
178
179 Unknown 'strict' tag(s) '...'
180
181As of version 1.04 (Perl 5.10), strict verifies that it is used as
182"strict" to avoid the dreaded Strict trap on case insensitive file
183systems.
184
185=cut