Filename | /Users/ether/perl5/perlbrew/perls/36.0/lib/5.36.0/strict.pm |
Statements | Executed 0 statements in 0s |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
226 | 182 | 169 | 610µs | 610µs | import | strict::
90 | 90 | 48 | 482µs | 482µs | unimport | strict::
0 | 0 | 0 | 0s | 0s | BEGIN | strict::
0 | 0 | 0 | 0s | 0s | __ANON__[:31] | strict::
0 | 0 | 0 | 0s | 0s | __ANON__[:37] | strict::
0 | 0 | 0 | 0s | 0s | bits | strict::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package strict; | ||||
2 | |||||
3 | $strict::VERSION = "1.12"; | ||||
4 | |||||
5 | my ( %bitmask, %explicit_bitmask ); | ||||
6 | |||||
7 | BEGIN { | ||||
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 | |||||
40 | sub 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 610µs within strict::import which was called 226 times, avg 3µs/call:
# 18 times (17µs+0s) by strictures::_enable_2 at line 169 of strictures.pm, avg 944ns/call
# 17 times (28µs+0s) by Moo::import at line 46 of Moo.pm, avg 2µs/call
# 6 times (13µs+0s) by Mojo::Base::import at line 102 of Mojo/Base.pm, avg 2µs/call
# 4 times (23µs+0s) by Role::Tiny::import at line 84 of Role/Tiny.pm, avg 6µs/call
# 4 times (8µs+0s) by strictures::_enable_1 at line 139 of strictures.pm, avg 2µs/call
# once (36µs+0s) by YAML::PP::Loader::BEGIN@2 at line 2 of YAML/PP/Parser.pm
# once (8µs+0s) by Fcntl::BEGIN@58 at line 58 of Fcntl.pm
# once (8µs+0s) by main::BEGIN@1 at line 1 of /Users/ether/git/fastly/Heavenly/profiling/jsm-0.558-plus-no-annotations-om-0.037/../prof.pl
# once (8µs+0s) by Pod::Simple::BEGIN@2 at line 2 of Pod/Simple/TiedOutFH.pm
# once (8µs+0s) by Class::Inspector::BEGIN@6 at line 6 of Class/Inspector.pm
# once (6µs+0s) by IO::Compress::Gzip::BEGIN@5 at line 5 of IO/Compress/Gzip.pm
# once (5µs+0s) by Module::Runtime::BEGIN@1.315 at line 1 of /Users/ether/git/JSON-Schema-Modern/lib/JSON/Schema/Modern/Vocabulary/FormatAnnotation.pm
# once (5µs+0s) by List::Util::BEGIN@9 at line 9 of List/Util.pm
# once (5µs+0s) by Time::HiRes::BEGIN@4 at line 4 of Time/HiRes.pm
# once (5µs+0s) by Exporter::BEGIN@3 at line 3 of Exporter.pm
# once (5µs+0s) by YAML::PP::Parser::BEGIN@1 at line 1 of YAML/PP/Lexer.pm
# once (5µs+0s) by vars::BEGIN@8 at line 8 of vars.pm
# once (5µs+0s) by Sub::Util::BEGIN@7 at line 7 of Sub/Util.pm
# once (5µs+0s) by base::BEGIN@4 at line 4 of base.pm
# once (5µs+0s) by Module::Runtime::BEGIN@1.311 at line 1 of /Users/ether/git/JSON-Schema-Modern/lib/JSON/Schema/Modern/Vocabulary/Validation.pm
# once (5µs+0s) by Module::Runtime::BEGIN@1.319 at line 1 of /Users/ether/git/JSON-Schema-Modern/lib/JSON/Schema/Modern/Vocabulary/MetaData.pm
# once (4µs+0s) by PerlIO::encoding::BEGIN@3 at line 3 of PerlIO/encoding.pm
# once (4µs+0s) by Encode::Alias::BEGIN@2 at line 2 of Encode/Alias.pm
# once (4µs+0s) by Moo::_Utils::BEGIN@1.305 at line 1 of /Users/ether/git/JSON-Schema-Modern/lib/JSON/Schema/Modern/Vocabulary.pm
# once (4µs+0s) by Sub::Exporter::Progressive::BEGIN@3 at line 3 of Sub/Exporter/Progressive.pm
# once (4µs+0s) by Config::BEGIN@5 at line 5 of Config_heavy.pl
# once (4µs+0s) by OpenAPI::Modern::BEGIN@1.242 at line 1 of JSON/Schema/Modern/Document/OpenAPI.pm
# once (4µs+0s) by Method::Generate::Constructor::BEGIN@2 at line 2 of Method/Generate/Constructor.pm
# once (4µs+0s) by Type::Library::BEGIN@4 at line 4 of Type/Library.pm
# once (4µs+0s) by Unicode::Normalize::BEGIN@4 at line 4 of Unicode/Normalize.pm
# once (4µs+0s) by YAML::PP::Parser::BEGIN@1.287 at line 1 of YAML/PP/Exception.pm
# once (4µs+0s) by Mojo::Base::BEGIN@3 at line 3 of Mojo/Base.pm
# once (4µs+0s) by Module::Runtime::BEGIN@1.313 at line 1 of /Users/ether/git/JSON-Schema-Modern/lib/JSON/Schema/Modern/Vocabulary/FormatAssertion.pm
# once (4µs+0s) by YAML::PP::Dumper::BEGIN@1.295 at line 1 of YAML/PP/Representer.pm
# once (4µs+0s) by overload::BEGIN@3 at line 3 of overload.pm
# once (4µs+0s) by Symbol::BEGIN@3 at line 3 of Symbol.pm
# once (4µs+0s) by IO::BEGIN@7 at line 7 of IO.pm
# once (4µs+0s) by Pod::Usage::BEGIN@13 at line 13 of Pod/Usage.pm
# once (4µs+0s) by Types::Standard::Tuple::BEGIN@6 at line 6 of Types/Standard/Tuple.pm
# once (4µs+0s) by attributes::BEGIN@9 at line 9 of attributes.pm
# once (4µs+0s) by YAML::PP::Loader::BEGIN@2.291 at line 2 of YAML/PP/Constructor.pm
# once (4µs+0s) by IO::File::BEGIN@128 at line 128 of IO/File.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 Pod::Simple::LinkSection::BEGIN@6 at line 6 of Pod/Simple/LinkSection.pm
# once (3µs+0s) by main::BEGIN@2.281 at line 2 of YAML/PP.pm
# once (3µs+0s) by YAML::PP::BEGIN@1.293 at line 1 of YAML/PP/Dumper.pm
# once (3µs+0s) by if::BEGIN@2 at line 2 of if.pm
# once (3µs+0s) by Config::BEGIN@9 at line 9 of Config.pm
# once (3µs+0s) by Tie::Array::BEGIN@4 at line 4 of Tie/Array.pm
# once (3µs+0s) by Pod::Text::BEGIN@18 at line 18 of Pod/Text.pm
# once (3µs+0s) by File::GlobMapper::BEGIN@3 at line 3 of File/GlobMapper.pm
# once (3µs+0s) by JSON::Schema::Modern::BEGIN@2 at line 2 of Path/Tiny.pm
# once (3µs+0s) by JSON::Schema::Modern::BEGIN@1.159 at line 1 of /Users/ether/git/JSON-Schema-Modern/lib/JSON/Schema/Modern/Utilities.pm
# once (3µs+0s) by Moo::sification::BEGIN@2 at line 2 of Moo/sification.pm
# once (3µs+0s) by IO::Compress::Base::Common::BEGIN@520 at line 520 of IO/Compress/Base/Common.pm
# once (3µs+0s) by Module::Runtime::BEGIN@1 at line 1 of /Users/ether/git/JSON-Schema-Modern/lib/JSON/Schema/Modern/Vocabulary/Core.pm
# once (3µs+0s) by List::MoreUtils::XS::BEGIN@4 at line 4 of List/MoreUtils/XS.pm
# once (3µs+0s) by Types::Standard::ArrayRef::BEGIN@6 at line 6 of Types/Standard/ArrayRef.pm
# once (3µs+0s) by Types::Standard::Map::BEGIN@6 at line 6 of Types/Standard/Map.pm
# once (3µs+0s) by Encode::MIME::Name::BEGIN@2 at line 2 of Encode/MIME/Name.pm
# once (3µs+0s) by Params::Util::BEGIN@59 at line 59 of Params/Util.pm
# once (3µs+0s) by YAML::PP::BEGIN@1.283 at line 1 of YAML/PP/Schema/JSON.pm
# once (3µs+0s) by Type::Tiny::Class::BEGIN@4 at line 4 of Type/Tiny/Class.pm
# once (3µs+0s) by YAML::PP::BEGIN@2.285 at line 2 of YAML/PP/Loader.pm
# once (3µs+0s) by Types::Standard::HashRef::BEGIN@6 at line 6 of Types/Standard/HashRef.pm
# once (3µs+0s) by Module::Load::BEGIN@1 at line 1 of YAML/PP/Schema/Core.pm
# once (3µs+0s) by Module::Runtime::BEGIN@1.307 at line 1 of /Users/ether/git/JSON-Schema-Modern/lib/JSON/Schema/Modern/Vocabulary/Applicator.pm
# once (3µs+0s) by JSON::Schema::Modern::BEGIN@1.66 at line 1 of /Users/ether/git/JSON-Schema-Modern/lib/JSON/Schema/Modern/Error.pm
# once (3µs+0s) by Moo::Role::BEGIN@2 at line 2 of Moo/Role.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 Symbol::BEGIN@167 at line 167 of Symbol.pm
# once (3µs+0s) by Type::Tiny::Duck::BEGIN@4 at line 4 of Type/Tiny/Duck.pm
# once (3µs+0s) by constant::BEGIN@3 at line 3 of constant.pm
# once (3µs+0s) by Method::Generate::BuildAll::BEGIN@2 at line 2 of Method/Generate/BuildAll.pm
# once (3µs+0s) by main::BEGIN@1.2 at line 1 of OpenAPI/Modern.pm
# once (3µs+0s) by MooX::TypeTiny::BEGIN@2 at line 2 of MooX/TypeTiny.pm
# once (3µs+0s) by IO::Handle::BEGIN@264 at line 264 of IO/Handle.pm
# once (3µs+0s) by JSON::Schema::Modern::Vocabulary::Applicator::BEGIN@1.309 at line 1 of /Users/ether/git/JSON-Schema-Modern/lib/JSON/Schema/Modern/Vocabulary/Unevaluated.pm
# once (3µs+0s) by parent::BEGIN@2 at line 2 of parent.pm
# once (3µs+0s) by JSON::Schema::Modern::BEGIN@1.113 at line 1 of /Users/ether/git/JSON-Schema-Modern/lib/JSON/Schema/Modern/Document.pm
# once (3µs+0s) by POSIX::BEGIN@2 at line 2 of POSIX.pm
# once (3µs+0s) by Exporter::Tiny::BEGIN@4 at line 4 of Exporter/Tiny.pm
# once (3µs+0s) by Socket::BEGIN@3 at line 3 of Socket.pm
# once (3µs+0s) by Digest::SHA::BEGIN@5 at line 5 of Digest/SHA.pm
# once (3µs+0s) by IO::Seekable::BEGIN@99 at line 99 of IO/Seekable.pm
# once (3µs+0s) by B::Hooks::EndOfScope::BEGIN@5 at line 5 of B/Hooks/EndOfScope.pm
# once (3µs+0s) by Role::Tiny::With::BEGIN@3 at line 3 of Role/Tiny/With.pm
# once (2µs+0s) by List::MoreUtils::BEGIN@64 at line 64 of List/MoreUtils.pm
# once (2µs+0s) by List::MoreUtils::BEGIN@4 at line 4 of List/MoreUtils.pm
# once (2µs+0s) by JSON::Schema::Modern::BEGIN@1.81 at line 1 of /Users/ether/git/JSON-Schema-Modern/lib/JSON/Schema/Modern/Result.pm
# once (2µs+0s) by IO::Compress::RawDeflate::BEGIN@5 at line 5 of IO/Compress/RawDeflate.pm
# once (2µs+0s) by Role::Tiny::BEGIN@2 at line 2 of Role/Tiny.pm
# once (2µs+0s) by IO::Compress::Gzip::Constants::BEGIN@3 at line 3 of IO/Compress/Gzip/Constants.pm
# once (2µs+0s) by File::Spec::Unix::BEGIN@3 at line 3 of File/Spec/Unix.pm
# once (2µs+0s) by Package::Stash::XS::BEGIN@2 at line 2 of Package/Stash/XS.pm
# once (2µs+0s) by Moo::BEGIN@2 at line 2 of Moo.pm
# once (2µs+0s) by Digest::base::BEGIN@3 at line 3 of Digest/base.pm
# once (2µs+0s) by Ref::Util::XS::BEGIN@4 at line 4 of Ref/Util/XS.pm
# once (2µs+0s) by Scalar::Util::BEGIN@9 at line 9 of Scalar/Util.pm
# once (2µs+0s) by Moo::_Utils::BEGIN@1 at line 1 of Class/Method/Modifiers.pm
# once (2µs+0s) by Encode::BEGIN@5 at line 5 of Encode.pm
# once (2µs+0s) by YAML::PP::Dumper::BEGIN@1.298 at line 1 of YAML/PP/Writer/File.pm
# once (2µs+0s) by JSON::PP::IncrParser::BEGIN@1596 at line 1596 of JSON/PP.pm
# once (2µs+0s) by Module::Implementation::BEGIN@5 at line 5 of Module/Implementation.pm
# once (2µs+0s) by experimental::BEGIN@3 at line 3 of experimental.pm
# once (2µs+0s) by Encode::Encoding::BEGIN@4 at line 4 of Encode/Encoding.pm
# once (2µs+0s) by IO::Uncompress::Gunzip::BEGIN@8 at line 8 of IO/Uncompress/Gunzip.pm
# once (2µs+0s) by Params::Util::PP::BEGIN@3 at line 3 of Params/Util/PP.pm
# once (2µs+0s) by re::BEGIN@4 at line 4 of re.pm
# once (2µs+0s) by Package::Stash::BEGIN@2 at line 2 of Package/Stash.pm
# once (2µs+0s) by YAML::PP::Parser::BEGIN@2.289 at line 2 of YAML/PP/Reader.pm
# once (2µs+0s) by Data::Dumper::BEGIN@12 at line 12 of Data/Dumper.pm
# once (2µs+0s) by JSON::Schema::Modern::Vocabulary::Applicator::BEGIN@1 at line 1 of Sub/Install.pm
# once (2µs+0s) by Types::Standard::BEGIN@4 at line 4 of Types/Standard.pm
# once (2µs+0s) by Sub::Quote::BEGIN@5 at line 5 of Sub/Quote.pm
# once (2µs+0s) by JSON::Schema::Modern::Result::BEGIN@1 at line 1 of /Users/ether/git/JSON-Schema-Modern/lib/JSON/Schema/Modern/Annotation.pm
# once (2µs+0s) by Module::Runtime::BEGIN@1.321 at line 1 of JSON/Schema/Modern/Vocabulary/OpenAPI.pm
# once (2µs+0s) by File::Basename::BEGIN@50 at line 50 of File/Basename.pm
# once (2µs+0s) by Type::Coercion::BEGIN@4 at line 4 of Type/Coercion.pm
# once (2µs+0s) by File::Spec::BEGIN@3 at line 3 of File/Spec.pm
# once (2µs+0s) by Safe::Isa::BEGIN@3 at line 3 of Safe/Isa.pm
# once (2µs+0s) by IO::Compress::Base::BEGIN@6 at line 6 of IO/Compress/Base.pm
# once (2µs+0s) by Params::Util::BEGIN@87 at line 87 of Params/Util.pm
# once (2µs+0s) by Types::Standard::Dict::BEGIN@6 at line 6 of Types/Standard/Dict.pm
# once (2µs+0s) by Digest::MD5::BEGIN@3 at line 3 of Digest/MD5.pm
# once (2µs+0s) by version::regex::BEGIN@3 at line 3 of version/regex.pm
# once (2µs+0s) by Module::Runtime::BEGIN@1.317 at line 1 of /Users/ether/git/JSON-Schema-Modern/lib/JSON/Schema/Modern/Vocabulary/Content.pm
# once (2µs+0s) by Type::Tiny::Union::BEGIN@4 at line 4 of Type/Tiny/Union.pm
# once (2µs+0s) by namespace::clean::BEGIN@4 at line 4 of namespace/clean.pm
# once (2µs+0s) by IO::Compress::Zlib::Extra::BEGIN@5 at line 5 of IO/Compress/Zlib/Extra.pm
# once (2µs+0s) by YAML::PP::Dumper::BEGIN@2.297 at line 2 of YAML/PP/Writer.pm
# once (2µs+0s) by Cwd::BEGIN@2 at line 2 of Cwd.pm
# once (2µs+0s) by utf8::BEGIN@3 at line 3 of utf8.pm
# once (2µs+0s) by namespace::clean::_Util::BEGIN@13 at line 13 of namespace/clean/_Util.pm
# once (2µs+0s) by List::MoreUtils::PP::BEGIN@4 at line 4 of List/MoreUtils/PP.pm
# once (2µs+0s) by Moo::_Utils::BEGIN@2 at line 2 of Moo/_Utils.pm
# once (2µs+0s) by Ref::Util::BEGIN@4 at line 4 of Ref/Util.pm
# once (2µs+0s) by Carp::BEGIN@4 at line 4 of Carp.pm
# once (2µs+0s) by YAML::PP::Dumper::BEGIN@1 at line 1 of YAML/PP/Emitter.pm
# once (2µs+0s) by IO::Uncompress::Base::BEGIN@4 at line 4 of IO/Uncompress/Base.pm
# once (2µs+0s) by JSON::MaybeXS::BEGIN@3 at line 3 of JSON/MaybeXS.pm
# once (2µs+0s) by Try::Tiny::BEGIN@7 at line 7 of Try/Tiny.pm
# once (2µs+0s) by Exporter::Heavy::BEGIN@3 at line 3 of Exporter/Heavy.pm
# once (2µs+0s) by Mojo::Util::BEGIN@15 at line 15 of Getopt/Long.pm
# once (2µs+0s) by YAML::PP::BEGIN@1 at line 1 of YAML/PP/Schema.pm
# once (2µs+0s) by B::Hooks::EndOfScope::XS::BEGIN@4 at line 4 of B/Hooks/EndOfScope/XS.pm
# once (2µs+0s) by IO::Uncompress::RawInflate::BEGIN@4 at line 4 of IO/Uncompress/RawInflate.pm
# once (2µs+0s) by Pod::Simple::BEGIN@1521 at line 1521 of Pod/Simple.pm
# once (2µs+0s) by Pod::Simple::BEGIN@4 at line 4 of Pod/Simple.pm
# once (2µs+0s) by bytes::BEGIN@3 at line 3 of bytes.pm
# once (2µs+0s) by IO::Poll::BEGIN@10 at line 10 of IO/Poll.pm
# once (2µs+0s) by version::BEGIN@5 at line 5 of version.pm
# once (2µs+0s) by File::Glob::BEGIN@3 at line 3 of File/Glob.pm
# once (2µs+0s) by mro::BEGIN@10 at line 10 of mro.pm
# once (2µs+0s) by File::ShareDir::BEGIN@121 at line 121 of File/ShareDir.pm
# once (2µs+0s) by Type::Tiny::ConstrainedObject::BEGIN@4 at line 4 of Type/Tiny/ConstrainedObject.pm
# once (2µs+0s) by YAML::PP::Parser::BEGIN@2 at line 2 of YAML/PP/Render.pm
# once (2µs+0s) by MIME::Base64::BEGIN@3 at line 3 of MIME/Base64.pm
# once (2µs+0s) by YAML::PP::Lexer::BEGIN@1 at line 1 of YAML/PP/Grammar.pm
# once (2µs+0s) by MooX::HandlesVia::BEGIN@4 at line 4 of MooX/HandlesVia.pm
# once (2µs+0s) by Method::Generate::Accessor::BEGIN@2 at line 2 of Method/Generate/Accessor.pm
# once (2µs+0s) by Type::Tiny::Enum::BEGIN@4 at line 4 of Type/Tiny/Enum.pm
# once (2µs+0s) by YAML::PP::Schema::BEGIN@1 at line 1 of YAML/PP/Common.pm
# once (2µs+0s) by Types::TypeTiny::BEGIN@4 at line 4 of Types/TypeTiny.pm
# once (2µs+0s) by Eval::TypeTiny::BEGIN@3 at line 3 of Eval/TypeTiny.pm
# once (2µs+0s) by Compress::Raw::Zlib::BEGIN@8 at line 8 of Compress/Raw/Zlib.pm
# once (2µs+0s) by Encode::Config::BEGIN@7 at line 7 of Encode/Config.pm
# once (2µs+0s) by Moo::Object::BEGIN@2 at line 2 of Moo/Object.pm
# once (1µs+0s) by List::MoreUtils::BEGIN@134 at line 134 of List/MoreUtils.pm
# once (1µs+0s) by URI::Escape::BEGIN@3 at line 3 of URI/Escape.pm
# once (1µs+0s) by Sub::Exporter::Progressive::BEGIN@26 at line 26 of Sub/Exporter/Progressive.pm
# once (1µs+0s) by Module::Load::BEGIN@3 at line 3 of Module/Load.pm
# once (1µs+0s) by JSON::PP::BEGIN@6 at line 6 of JSON/PP.pm
# once (1µs+0s) by Sub::Defer::BEGIN@2 at line 2 of Sub/Defer.pm
# once (1µs+0s) by IO::Compress::Base::Common::BEGIN@3 at line 3 of IO/Compress/Base/Common.pm
# once (1µs+0s) by strictures::BEGIN@3 at line 3 of strictures.pm
# once (1µs+0s) by OpenAPI::Modern::BEGIN@1 at line 1 of /Users/ether/git/JSON-Schema-Modern/lib/JSON/Schema/Modern.pm
# once (1µs+0s) by Pod::Escapes::BEGIN@2 at line 2 of Pod/Escapes.pm
# once (1µs+0s) by Type::Tiny::BEGIN@4 at line 4 of Type/Tiny.pm
# once (1µs+0s) by Variable::Magic::BEGIN@5 at line 5 of Variable/Magic.pm
# once (1µs+0s) by JSON::PP::Boolean::BEGIN@3 at line 3 of JSON/PP/Boolean.pm
# once (1µs+0s) by Pod::Simple::BlackBox::BEGIN@22 at line 22 of Pod/Simple/BlackBox.pm | ||||
61 | shift; | ||||
62 | $^H |= @_ ? &bits : all_bits | all_explicit_bits; | ||||
63 | } | ||||
64 | |||||
65 | # spent 482µs within strict::unimport which was called 90 times, avg 5µs/call:
# once (38µs+0s) by Module::Load::BEGIN@89 at line 89 of Module/Load.pm
# once (10µs+0s) by Type::Tiny::BEGIN@1435 at line 1435 of Type/Tiny.pm
# once (10µs+0s) by Path::Tiny::BEGIN@1613 at line 1613 of Path/Tiny.pm
# once (9µs+0s) by IO::Handle::BEGIN@609 at line 609 of IO/Handle.pm
# once (9µs+0s) by Exporter::BEGIN@4 at line 4 of Exporter.pm
# once (9µs+0s) by Type::Tiny::Class::BEGIN@164 at line 164 of Type/Tiny/Class.pm
# once (9µs+0s) by Ref::Util::BEGIN@25 at line 25 of Ref/Util.pm
# once (8µs+0s) by Type::Library::BEGIN@188 at line 188 of Type/Library.pm
# once (8µs+0s) by B::BEGIN@268 at line 268 of B.pm
# once (8µs+0s) by Carp::BEGIN@730 at line 730 of Carp.pm
# once (8µs+0s) by Class::Inspector::BEGIN@331 at line 331 of Class/Inspector.pm
# once (8µs+0s) by File::Spec::Unix::BEGIN@167 at line 167 of File/Spec/Unix.pm
# once (8µs+0s) by Pod::Simple::BEGIN@1517 at line 1517 of Pod/Simple.pm
# once (8µs+0s) by Mojo::Util::BEGIN@203 at line 203 of Mojo/Util.pm
# once (7µs+0s) by Sub::Quote::BEGIN@348 at line 348 of Sub/Quote.pm
# once (7µs+0s) by Exporter::Tiny::BEGIN@69 at line 69 of Exporter/Tiny.pm
# once (7µs+0s) by Time::HiRes::BEGIN@70 at line 70 of Time/HiRes.pm
# once (7µs+0s) by List::MoreUtils::PP::BEGIN@870 at line 870 of List/MoreUtils/PP.pm
# once (7µs+0s) by Symbol::BEGIN@137 at line 137 of Symbol.pm
# once (7µs+0s) by Symbol::BEGIN@103 at line 103 of Symbol.pm
# once (7µs+0s) by Cwd::BEGIN@638 at line 638 of Cwd.pm
# once (7µs+0s) by Type::Tiny::BEGIN@71 at line 71 of Type/Tiny.pm
# once (7µs+0s) by List::Util::BEGIN@35 at line 35 of List/Util.pm
# once (6µs+0s) by Socket::BEGIN@842 at line 842 of Socket.pm
# once (6µs+0s) by parent::BEGIN@21 at line 21 of parent.pm
# once (6µs+0s) by version::BEGIN@27 at line 27 of version.pm
# once (6µs+0s) by File::ShareDir::BEGIN@411 at line 411 of File/ShareDir.pm
# once (6µs+0s) by Compress::Raw::Zlib::BEGIN@113 at line 113 of Compress/Raw/Zlib.pm
# once (6µs+0s) by Params::Util::BEGIN@85 at line 85 of Params/Util.pm
# once (6µs+0s) by overload::BEGIN@4 at line 4 of overload.pm
# once (6µs+0s) by Moo::_Utils::BEGIN@278 at line 278 of Moo/_Utils.pm
# once (6µs+0s) by Carp::BEGIN@256 at line 256 of Carp.pm
# once (6µs+0s) by Role::Tiny::BEGIN@24 at line 24 of Role/Tiny.pm
# once (6µs+0s) by Mojo::Util::BEGIN@532 at line 532 of Mojo/Util.pm
# once (6µs+0s) by Module::Load::BEGIN@14 at line 14 of Module/Load.pm
# once (6µs+0s) by Module::Implementation::BEGIN@128 at line 128 of Module/Implementation.pm
# once (6µs+0s) by constant::BEGIN@40 at line 40 of constant.pm
# once (5µs+0s) by Sub::Defer::BEGIN@14 at line 14 of Sub/Defer.pm
# once (5µs+0s) by Type::Library::BEGIN@284 at line 284 of Type/Library.pm
# once (5µs+0s) by Sub::Install::BEGIN@170 at line 170 of Sub/Install.pm
# once (5µs+0s) by Mojo::Base::BEGIN@45 at line 45 of Mojo/Base.pm
# once (5µs+0s) by Types::TypeTiny::BEGIN@68 at line 68 of Types/TypeTiny.pm
# once (5µs+0s) by Carp::BEGIN@188 at line 188 of Carp.pm
# once (5µs+0s) by Class::Method::Modifiers::BEGIN@54 at line 54 of Class/Method/Modifiers.pm
# once (5µs+0s) by Sub::Exporter::Progressive::BEGIN@20 at line 20 of Sub/Exporter/Progressive.pm
# once (5µs+0s) by Symbol::BEGIN@156 at line 156 of Symbol.pm
# once (5µs+0s) by List::MoreUtils::BEGIN@54 at line 54 of List/MoreUtils.pm
# once (5µs+0s) by JSON::MaybeXS::BEGIN@32 at line 32 of JSON/MaybeXS.pm
# once (5µs+0s) by Exporter::Heavy::BEGIN@4 at line 4 of Exporter/Heavy.pm
# once (5µs+0s) by Config::BEGIN@47 at line 47 of Config.pm
# once (4µs+0s) by Exporter::Tiny::BEGIN@347 at line 347 of Exporter/Tiny.pm
# once (4µs+0s) by Exporter::Tiny::BEGIN@190 at line 190 of Exporter/Tiny.pm
# once (4µs+0s) by Socket::BEGIN@941 at line 941 of Socket.pm
# once (4µs+0s) by MooX::HandlesVia::BEGIN@25 at line 25 of MooX/HandlesVia.pm
# once (4µs+0s) by Type::Library::BEGIN@232 at line 232 of Type/Library.pm
# once (4µs+0s) by Types::Standard::BEGIN@2 at line 2 of (eval 46)[Types/Standard.pm:48]
# once (4µs+0s) by Mojo::Base::BEGIN@133 at line 133 of Mojo/Base.pm
# once (4µs+0s) by List::MoreUtils::PP::BEGIN@421 at line 421 of List/MoreUtils/PP.pm
# once (4µs+0s) by List::MoreUtils::PP::BEGIN@129 at line 129 of List/MoreUtils/PP.pm
# once (4µs+0s) by Moo::_Utils::BEGIN@6 at line 6 of Moo/_Utils.pm
# once (4µs+0s) by Moo::_Utils::BEGIN@141 at line 141 of Moo/_Utils.pm
# once (4µs+0s) by Moo::BEGIN@70 at line 70 of Moo.pm
# once (4µs+0s) by Moo::BEGIN@230 at line 230 of Moo.pm
# once (3µs+0s) by Exporter::Tiny::BEGIN@396 at line 396 of Exporter/Tiny.pm
# once (3µs+0s) by POSIX::BEGIN@225 at line 225 of POSIX.pm
# once (3µs+0s) by File::Glob::BEGIN@54 at line 54 of File/Glob.pm
# once (3µs+0s) by Type::Library::BEGIN@207 at line 207 of Type/Library.pm
# once (3µs+0s) by Type::Library::BEGIN@314 at line 314 of Type/Library.pm
# once (3µs+0s) by Type::Tiny::Class::BEGIN@185 at line 185 of Type/Tiny/Class.pm
# once (3µs+0s) by Moo::BEGIN@180 at line 180 of Moo.pm
# once (3µs+0s) by Moo::BEGIN@275 at line 275 of Moo.pm
# once (3µs+0s) by Class::Inspector::BEGIN@344 at line 344 of Class/Inspector.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::Method::Modifiers::BEGIN@145 at line 145 of Class/Method/Modifiers.pm
# once (3µs+0s) by Ref::Util::XS::BEGIN@47 at line 47 of Ref/Util/XS.pm
# once (3µs+0s) by Role::Tiny::BEGIN@65 at line 65 of Role/Tiny.pm
# once (3µs+0s) by List::MoreUtils::BEGIN@129 at line 129 of List/MoreUtils.pm
# once (3µs+0s) by constant::BEGIN@90 at line 90 of constant.pm
# once (2µs+0s) by Exporter::Tiny::BEGIN@253 at line 253 of Exporter/Tiny.pm
# once (2µs+0s) by Exporter::Tiny::BEGIN@217 at line 217 of Exporter/Tiny.pm
# once (2µs+0s) by Exporter::Tiny::BEGIN@236 at line 236 of Exporter/Tiny.pm
# once (2µs+0s) by Types::TypeTiny::BEGIN@98 at line 98 of Types/TypeTiny.pm
# once (2µs+0s) by Types::TypeTiny::BEGIN@114 at line 114 of Types/TypeTiny.pm
# once (2µs+0s) by Types::TypeTiny::BEGIN@124 at line 124 of Types/TypeTiny.pm
# once (2µs+0s) by List::MoreUtils::PP::BEGIN@154 at line 154 of List/MoreUtils/PP.pm
# once (2µs+0s) by List::MoreUtils::PP::BEGIN@179 at line 179 of List/MoreUtils/PP.pm
# once (2µs+0s) by Carp::BEGIN@751 at line 751 of Carp.pm
# once (2µs+0s) by constant::BEGIN@65 at line 65 of constant.pm
# once (2µs+0s) by constant::BEGIN@141 at line 141 of constant.pm
# once (1µs+0s) by Role::Tiny::BEGIN@25 at line 25 of Role/Tiny.pm | ||||
66 | shift; | ||||
67 | |||||
68 | if (@_) { | ||||
69 | $^H &= ~&bits; | ||||
70 | } | ||||
71 | else { | ||||
72 | $^H &= ~all_bits; | ||||
73 | $^H |= all_explicit_bits; | ||||
74 | } | ||||
75 | } | ||||
76 | |||||
77 | 1; | ||||
78 | __END__ | ||||
79 | |||||
80 | =head1 NAME | ||||
81 | |||||
82 | strict - 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 | |||||
97 | The C<strict> pragma disables certain Perl expressions that could behave | ||||
98 | unexpectedly or are difficult to debug, turning them into errors. The | ||||
99 | effect of this pragma is limited to the current file or scope block. | ||||
100 | |||||
101 | If 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 | ||||
103 | casual programming.) Currently, there are three possible things to be | ||||
104 | strict about: "subs", "vars", and "refs". | ||||
105 | |||||
106 | =over 6 | ||||
107 | |||||
108 | =item C<strict refs> | ||||
109 | |||||
110 | This generates a runtime error if you | ||||
111 | use 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 | |||||
121 | There is one exception to this rule: | ||||
122 | |||||
123 | $bar = \&{'foo'}; | ||||
124 | &$bar; | ||||
125 | |||||
126 | is allowed so that C<goto &$AUTOLOAD> would not break under stricture. | ||||
127 | |||||
128 | |||||
129 | =item C<strict vars> | ||||
130 | |||||
131 | This generates a compile-time error if you access a variable that was | ||||
132 | neither explicitly declared (using any of C<my>, C<our>, C<state>, or C<use | ||||
133 | vars>) nor fully qualified. (Because this is to avoid variable suicide | ||||
134 | problems and subtle dynamic scoping issues, a merely C<local> variable isn't | ||||
135 | good enough.) See L<perlfunc/my>, L<perlfunc/our>, L<perlfunc/state>, | ||||
136 | L<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 | |||||
147 | The local() generated a compile-time error because you just touched a global | ||||
148 | name without fully qualifying it. | ||||
149 | |||||
150 | Because of their special use by sort(), the variables $a and $b are | ||||
151 | exempted from this check. | ||||
152 | |||||
153 | =item C<strict subs> | ||||
154 | |||||
155 | This disables the poetry optimization, generating a compile-time error if | ||||
156 | you try to use a bareword identifier that's not a subroutine, unless it | ||||
157 | is a simple identifier (no colons) and that it appears in curly braces, | ||||
158 | on the left hand side of the C<< => >> symbol, or has the unary minus | ||||
159 | operator 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 | |||||
168 | See L<perlmodlib/Pragmatic Modules>. | ||||
169 | |||||
170 | =head1 HISTORY | ||||
171 | |||||
172 | C<strict 'subs'>, with Perl 5.6.1, erroneously permitted to use an unquoted | ||||
173 | compound identifier (e.g. C<Foo::Bar>) as a hash key (before C<< => >> or | ||||
174 | inside curlies), but without forcing it always to a literal string. | ||||
175 | |||||
176 | Starting with Perl 5.8.1 strict is strict about its restrictions: | ||||
177 | if unknown restrictions are used, the strict pragma will abort with | ||||
178 | |||||
179 | Unknown 'strict' tag(s) '...' | ||||
180 | |||||
181 | As 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 | ||||
183 | systems. | ||||
184 | |||||
185 | =cut |