Profile of /usr/local/lib/perl5/5.10.1/strict.pm

← Index
NYTProf Performance Profile «block view•line view•sub view»
For 05.Domain_and_Item.t
Run on Tue May 4 17:21:41 2010
Reported on Tue May 4 17:22:21 2010

File | /usr/local/lib/perl5/5.10.1/strict.pm
Statements Executed | 1265
Statement Execution Time | 3.18ms

Subroutines — ordered by exclusive time
Calls | P | F | Exclusive Time | Inclusive Time | Subroutine
--- | --- | --- | --- | --- | ---
278 | 215 | 210 | 936µs | 962µs | strict::::importstrict::import
75 | 75 | 49 | 607µs | 1.13ms | strict::::unimportstrict::unimport
78 | 3 | 1 | 562µs | 562µs | strict::::bitsstrict::bits
1 | 1 | 2 | 40µs | 40µs | strict::::CORE:regcompstrict::CORE:regcomp (opcode)
1 | 1 | 2 | 14µs | 14µs | strict::::CORE:matchstrict::CORE:match (opcode)

Call graph for these subroutines as a Graphviz dot language file.

Line | State ments | Time on line | Calls | Time in subs | Code
--- | --- | --- | --- | --- | ---
1 |  |  |  |  | package strict;
2 |  |  |  |  |
3 | 1 | 1µs |  |  | $strict::VERSION = "1.04";
4 |  |  |  |  |
5 |  |  |  |  | # Verify that we're called correctly so that strictures will work.
6 | 1 | 72µs | 2 | 54µs | unless ( __FILE__ =~ /(^|[\/\\])\Q${\__PACKAGE__}\E\.pmc?$/ ) { # spent 40µs making 1 call to strict::CORE:regcomp # spent 14µs making 1 call to strict::CORE:match
7 |  |  |  |  | # Can't use Carp, since Carp uses us!
8 |  |  |  |  | my (undef, $f, $l) = caller;
9 |  |  |  |  | die("Incorrect use of pragma '${\__PACKAGE__}' at $f line $l.\n");
10 |  |  |  |  | }
11 |  |  |  |  |
12 | 1 | 4µs |  |  | my %bitmask = (
13 |  |  |  |  | refs => 0x00000002,
14 |  |  |  |  | subs => 0x00000200,
15 |  |  |  |  | vars => 0x00000400
16 |  |  |  |  | );
17 |  |  |  |  |
18 |  |  |  |  | # spent 562µs within strict::bits which was called 78 times, avg 7µs/call: # 74 times (522µs+0s) by strict::unimport at line 41, avg 7µs/call # 3 times (26µs+0s) by strict::import at line 36, avg 9µs/call # once (14µs+0s) by Test::More::BEGIN@4 at line 32 sub bits {
19 | 554 | 722µs |  |  | my $bits = 0;
20 |  |  |  |  | my @wrong;
21 |  |  |  |  | foreach my $s (@_) {
22 |  |  |  |  | push @wrong, $s unless exists $bitmask{$s};
23 |  |  |  |  | $bits |= $bitmask{$s} || 0;
24 |  |  |  |  | }
25 |  |  |  |  | if (@wrong) {
26 |  |  |  |  | require Carp;
27 |  |  |  |  | Carp::croak("Unknown 'strict' tag(s) '@wrong'");
28 |  |  |  |  | }
29 |  |  |  |  | $bits;
30 |  |  |  |  | }
31 |  |  |  |  |
32 | 1 | 2µs | 1 | 14µs | my $default_bits = bits(qw(refs subs vars)); # spent 14µs making 1 call to strict::bits
33 |  |  |  |  |
34 |  |  |  |  | # spent 962µs (936+27) within strict::import which was called 278 times, avg 3µs/call: # 59 times (187µs+0s) by Moose::Exporter::__ANON__[/usr/local/lib/perl5/site_perl/5.10.1/darwin-2level/Moose/Exporter.pm:389] at line 344 of Moose/Exporter.pm, avg 3µs/call # 5 times (10µs+0s) by Moose::Exporter::import at line 566 of Moose/Exporter.pm, avg 2µs/call # 2 times (4µs+0s) by MooseX::Types::import at line 335 of MooseX/Types.pm, avg 2µs/call # once (9µs+11µs) by base::BEGIN@3 at line 3 of base.pm # once (8µs+10µs) by Class::Data::Inheritable::BEGIN@3 at line 3 of Class/Data/Inheritable.pm # once (12µs+0s) by Cwd::BEGIN@170 at line 170 of Cwd.pm # once (6µs+5µs) by vars::BEGIN@8 at line 8 of vars.pm # once (9µs+0s) by IO::Select::BEGIN@9 at line 9 of IO/Select.pm # once (8µs+0s) by Test::Builder::Module::BEGIN@3 at line 3 of Test/Builder/Module.pm # once (8µs+0s) by utf8::BEGIN@2 at line 2 of utf8_heavy.pl # once (8µs+0s) by Try::Tiny::BEGIN@3 at line 3 of Try/Tiny.pm # once (8µs+0s) by Test::Deep::BEGIN@1 at line 1 of Test/Deep/Ignore.pm # once (8µs+0s) by DateTime::TimeZone::BEGIN@5 at line 5 of DateTime/TimeZone.pm # once (7µs+0s) by IO::Uncompress::Gunzip::BEGIN@8 at line 8 of IO/Uncompress/Gunzip.pm # once (7µs+0s) by Class::MOP::Mixin::AttributeCore::BEGIN@3 at line 3 of Class/MOP/Mixin/AttributeCore.pm # once (7µs+0s) by MooseX::ClassAttribute::Role::Meta::Attribute::BEGIN@3 at line 3 of MooseX/ClassAttribute/Role/Meta/Attribute.pm # once (7µs+0s) by URI::Escape::BEGIN@2 at line 2 of URI/Escape.pm # once (7µs+0s) by Net::HTTP::BEGIN@3 at line 3 of Net/HTTP.pm # once (6µs+0s) by Class::MOP::Deprecated::BEGIN@3 at line 3 of Class/MOP/Deprecated.pm # once (6µs+0s) by Test::More::BEGIN@4 at line 4 of Test/More.pm # once (6µs+0s) by Module::Find::BEGIN@4 at line 4 of Module/Find.pm # once (6µs+0s) by HTTP::Config::BEGIN@3 at line 3 of HTTP/Config.pm # once (6µs+0s) by Compress::Raw::Zlib::BEGIN@11 at line 11 of Compress/Raw/Zlib.pm # once (6µs+0s) by Moose::Meta::Mixin::AttributeCore::BEGIN@3 at line 3 of Moose/Meta/Mixin/AttributeCore.pm # once (6µs+0s) by IO::Compress::Base::Common::BEGIN@3 at line 3 of IO/Compress/Base/Common.pm # once (5µs+0s) by Params::Validate::BEGIN@3 at line 3 of Params/Validate.pm # once (5µs+0s) by Clone::BEGIN@4 at line 4 of Clone.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 Exporter::Heavy::BEGIN@3 at line 3 of Exporter/Heavy.pm # once (4µs+0s) by IO::Socket::UNIX::BEGIN@9 at line 9 of IO/Socket/UNIX.pm # once (4µs+0s) by Test::Deep::BEGIN@1 at line 1 of Test/Deep/Hash.pm # once (4µs+0s) by Moose::Meta::Role::Composite::BEGIN@3 at line 3 of Moose/Meta/Role/Composite.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 List::MoreUtils::BEGIN@4 at line 4 of List/MoreUtils.pm # once (4µs+0s) by Test::Deep::BEGIN@1 at line 1 of Test/Deep/ArrayLength.pm # once (4µs+0s) by Devel::StackTraceFrame::BEGIN@244 at line 244 of Devel/StackTrace.pm # once (4µs+0s) by Test::Deep::Ignore::BEGIN@1 at line 1 of Test/Deep/Cmp.pm # once (4µs+0s) by Class::MOP::Mixin::BEGIN@3 at line 3 of Class/MOP/Mixin.pm # once (4µs+0s) by DateTime::Infinite::BEGIN@3 at line 3 of DateTime/Infinite.pm # once (4µs+0s) by IO::Uncompress::RawInflate::BEGIN@4 at line 4 of IO/Uncompress/RawInflate.pm # once (4µs+0s) by Test::Deep::Hash::BEGIN@1 at line 1 of Test/Deep/HashKeys.pm # once (4µs+0s) by File::Basename::BEGIN@50 at line 50 of File/Basename.pm # once (4µs+0s) by Test::Deep::HashKeys::BEGIN@1 at line 1 of Test/Deep/HashKeysOnly.pm # once (4µs+0s) by HTTP::Date::BEGIN@11 at line 11 of HTTP/Date.pm # once (4µs+0s) by Fcntl::BEGIN@58 at line 58 of Fcntl.pm # once (4µs+0s) by MooseX::Types::UndefinedType::BEGIN@10 at line 10 of MooseX/Types/UndefinedType.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 lib::BEGIN@8 at line 8 of lib.pm # once (4µs+0s) by Time::Local::BEGIN@6 at line 6 of Time/Local.pm # once (4µs+0s) by Test::Deep::BEGIN@1 at line 1 of Test/Deep/RefType.pm # once (4µs+0s) by Test::Deep::BEGIN@1 at line 1 of Test/Deep/Shallow.pm # once (4µs+0s) by XML::Bare::BEGIN@4 at line 4 of XML/Bare.pm # once (4µs+0s) by Test::Deep::Hash::BEGIN@1 at line 1 of Test/Deep/Ref.pm # once (4µs+0s) by Test::Deep::BEGIN@1 at line 1 of Test/Deep/Blessed.pm # once (4µs+0s) by Digest::base::BEGIN@3 at line 3 of Digest/base.pm # once (3µs+0s) by Test::Deep::BEGIN@1 at line 1 of Test/Deep/ArrayElementsOnly.pm # once (3µs+0s) by Class::MOP::Module::BEGIN@4 at line 4 of Class/MOP/Module.pm # once (3µs+0s) by FileHandle::BEGIN@4 at line 4 of FileHandle.pm # once (3µs+0s) by Net::HTTP::Methods::BEGIN@5 at line 5 of Net/HTTP/Methods.pm # once (3µs+0s) by Digest::SHA::BEGIN@5 at line 5 of Digest/SHA.pm # once (3µs+0s) by AutoLoader::BEGIN@3 at line 3 of AutoLoader.pm # once (3µs+0s) by Class::MOP::Method::Constructor::BEGIN@4 at line 4 of Class/MOP/Method/Constructor.pm # once (3µs+0s) by Class::MOP::Method::Accessor::BEGIN@4 at line 4 of Class/MOP/Method/Accessor.pm # once (3µs+0s) by attributes::BEGIN@9 at line 9 of attributes.pm # once (3µs+0s) by IO::Uncompress::Base::BEGIN@4 at line 4 of IO/Uncompress/Base.pm # once (3µs+0s) by Moose::Meta::Method::Destructor::BEGIN@4 at line 4 of Moose/Meta/Method/Destructor.pm # once (3µs+0s) by Class::MOP::Mixin::HasMethods::BEGIN@3 at line 3 of Class/MOP/Mixin/HasMethods.pm # once (3µs+0s) by Moose::Meta::Method::Augmented::BEGIN@3 at line 3 of Moose/Meta/Method/Augmented.pm # once (3µs+0s) by URI::_generic::BEGIN@6 at line 6 of URI/_generic.pm # once (3µs+0s) by MIME::Base64::BEGIN@3 at line 3 of MIME/Base64.pm # once (3µs+0s) by Test::Deep::Hash::BEGIN@1 at line 1 of Test/Deep/HashElements.pm # once (3µs+0s) by Moose::Meta::Instance::BEGIN@4 at line 4 of Moose/Meta/Instance.pm # once (3µs+0s) by LWP::UserAgent::BEGIN@3 at line 3 of LWP/UserAgent.pm # once (3µs+0s) by DateTime::Locale::Catalog::BEGIN@17 at line 17 of DateTime/Locale/Catalog.pm # once (3µs+0s) by HTTP::Response::BEGIN@7 at line 7 of HTTP/Response.pm # once (3µs+0s) by DateTime::Format::Strptime::BEGIN@3 at line 3 of DateTime/Format/Strptime.pm # once (3µs+0s) by URI::BEGIN@3 at line 3 of URI.pm # once (3µs+0s) by Config::BEGIN@9 at line 9 of Config.pm # once (3µs+0s) by Sub::Identify::BEGIN@3 at line 3 of Sub/Identify.pm # once (3µs+0s) by Class::MOP::Mixin::HasAttributes::BEGIN@3 at line 3 of Class/MOP/Mixin/HasAttributes.pm # once (3µs+0s) by List::Util::BEGIN@11 at line 11 of List/Util.pm # once (3µs+0s) by DateTime::Locale::BEGIN@3 at line 3 of DateTime/Locale.pm # once (3µs+0s) by HTTP::Message::BEGIN@3 at line 3 of HTTP/Message.pm # once (3µs+0s) by Moose::Role::BEGIN@2 at line 2 of Moose/Role.pm # once (3µs+0s) by Class::MOP::Class::BEGIN@4 at line 4 of Class/MOP/Class.pm # once (3µs+0s) by SimpleDB::Client::Exception::BEGIN@54 at line 54 of SimpleDB/Client/Exception.pm # once (3µs+0s) by Class::MOP::Attribute::BEGIN@4 at line 4 of Class/MOP/Attribute.pm # once (3µs+0s) by Moose::Meta::TypeConstraint::BEGIN@4 at line 4 of Moose/Meta/TypeConstraint.pm # once (3µs+0s) by Moose::Meta::Role::BEGIN@4 at line 4 of Moose/Meta/Role.pm # once (3µs+0s) by Test::Deep::BEGIN@1 at line 1 of Test/Deep/Array.pm # once (3µs+0s) by URI::_query::BEGIN@3 at line 3 of URI/_query.pm # once (3µs+0s) by Class::MOP::Method::Wrapped::BEGIN@4 at line 4 of Class/MOP/Method/Wrapped.pm # once (3µs+0s) by LWP::ConnCache::BEGIN@3 at line 3 of LWP/ConnCache.pm # once (3µs+0s) by Test::Deep::BEGIN@1 at line 1 of Test/Deep/Stack.pm # once (3µs+0s) by HTTP::Headers::BEGIN@3 at line 3 of HTTP/Headers.pm # once (3µs+0s) by Moose::Exporter::BEGIN@3 at line 3 of Moose/Exporter.pm # once (3µs+0s) by DateTime::BEGIN@5 at line 5 of DateTime.pm # once (3µs+0s) by re::BEGIN@4 at line 4 of re.pm # once (3µs+0s) by Moose::Meta::Attribute::BEGIN@4 at line 4 of Moose/Meta/Attribute.pm # once (3µs+0s) by MooseX::ClassAttribute::BEGIN@3 at line 3 of MooseX/ClassAttribute.pm # once (3µs+0s) by POSIX::BEGIN@2 at line 2 of POSIX.pm # once (3µs+0s) by Moose::BEGIN@2 at line 2 of Moose.pm # once (3µs+0s) by Moose::Meta::Role::Method::Conflicting::BEGIN@4 at line 4 of Moose/Meta/Role/Method/Conflicting.pm # once (3µs+0s) by DateTime::TimeZone::Local::BEGIN@3 at line 3 of DateTime/TimeZone/Local.pm # once (3µs+0s) by IO::Socket::INET::BEGIN@9 at line 9 of IO/Socket/INET.pm # once (3µs+0s) by File::Spec::Unix::BEGIN@3 at line 3 of File/Spec/Unix.pm # once (3µs+0s) by SimpleDB::Class::Exception::BEGIN@45 at line 45 of ../lib/SimpleDB/Class/Exception.pm # once (3µs+0s) by Moose::Meta::Role::Application::BEGIN@3 at line 3 of Moose/Meta/Role/Application.pm # once (3µs+0s) by URI::_idna::BEGIN@6 at line 6 of URI/_idna.pm # once (3µs+0s) by Moose::Meta::Method::Accessor::BEGIN@4 at line 4 of Moose/Meta/Method/Accessor.pm # once (3µs+0s) by DateTime::Locale::en_US::BEGIN@21 at line 21 of DateTime/Locale/en_US.pm # once (3µs+0s) by Moose::Meta::Method::Delegation::BEGIN@4 at line 4 of Moose/Meta/Method/Delegation.pm # once (3µs+0s) by Moose::Util::MetaRole::BEGIN@3 at line 3 of Moose/Util/MetaRole.pm # once (3µs+0s) by DateTime::Duration::BEGIN@3 at line 3 of DateTime/Duration.pm # once (3µs+0s) by Moose::Meta::TypeConstraint::Role::BEGIN@3 at line 3 of Moose/Meta/TypeConstraint/Role.pm # once (3µs+0s) by DateTime::TimeZone::Floating::BEGIN@3 at line 3 of DateTime/TimeZone/Floating.pm # once (3µs+0s) by HTTP::Request::BEGIN@7 at line 7 of HTTP/Request.pm # once (3µs+0s) by URI::http::BEGIN@6 at line 6 of URI/http.pm # once (3µs+0s) by Moose::Meta::TypeConstraint::Parameterized::BEGIN@3 at line 3 of Moose/Meta/TypeConstraint/Parameterized.pm # once (3µs+0s) by Test::Deep::BEGIN@1 at line 1 of Test/Deep/RegexpVersion.pm # once (3µs+0s) by Moose::Util::BEGIN@3 at line 3 of Moose/Util.pm # once (3µs+0s) by Params::Validate::BEGIN@3 at line 3 of Params/ValidateXS.pm # once (3µs+0s) by MooseX::Types::CheckedUtilExports::BEGIN@10 at line 10 of MooseX/Types/CheckedUtilExports.pm # once (3µs+0s) by Class::MOP::Object::BEGIN@4 at line 4 of Class/MOP/Object.pm # once (3µs+0s) by Moose::Meta::Role::Application::ToInstance::BEGIN@3 at line 3 of Moose/Meta/Role/Application/ToInstance.pm # once (3µs+0s) by main::BEGIN@1 at line 1 of Test/Deep.pm # once (3µs+0s) by mro::BEGIN@10 at line 10 of mro.pm # once (3µs+0s) by IO::Compress::Base::Common::BEGIN@501 at line 501 of IO/Compress/Base/Common.pm # once (3µs+0s) by LWP::Protocol::BEGIN@7 at line 7 of LWP/Protocol.pm # once (3µs+0s) by Moose::Util::TypeConstraints::OptimizedConstraints::BEGIN@3 at line 3 of Moose/Util/TypeConstraints/OptimizedConstraints.pm # once (3µs+0s) by File::Glob::BEGIN@3 at line 3 of File/Glob.pm # once (3µs+0s) by Class::MOP::Class::Immutable::Trait::BEGIN@3 at line 3 of Class/MOP/Class/Immutable/Trait.pm # once (3µs+0s) by Devel::GlobalDestruction::BEGIN@5 at line 5 of Devel/GlobalDestruction.pm # once (3µs+0s) by Moose::Meta::Method::Constructor::BEGIN@4 at line 4 of Moose/Meta/Method/Constructor.pm # once (3µs+0s) by LWP::Protocol::http::BEGIN@3 at line 3 of LWP/Protocol/http.pm # once (3µs+0s) by Time::HiRes::BEGIN@3 at line 3 of Time/HiRes.pm # once (3µs+0s) by Moose::Meta::Role::Method::BEGIN@4 at line 4 of Moose/Meta/Role/Method.pm # once (3µs+0s) by Moose::Meta::Class::Immutable::Trait::BEGIN@3 at line 3 of Moose/Meta/Class/Immutable/Trait.pm # once (3µs+0s) by Class::MOP::Method::Generated::BEGIN@4 at line 4 of Class/MOP/Method/Generated.pm # once (3µs+0s) by Sub::Name::BEGIN@44 at line 44 of Sub/Name.pm # once (3µs+0s) by MooseX::Types::TypeDecorator::BEGIN@3 at line 3 of MooseX/Types/TypeDecorator.pm # once (3µs+0s) by Moose::Meta::TypeConstraint::Class::BEGIN@3 at line 3 of Moose/Meta/TypeConstraint/Class.pm # once (3µs+0s) by URI::_server::BEGIN@5 at line 5 of URI/_server.pm # once (3µs+0s) by Devel::GlobalDestruction::BEGIN@2 at line 2 of Sub/Exporter.pm # once (3µs+0s) by namespace::clean::BEGIN@1 at line 1 of B/Hooks/EndOfScope.pm # once (3µs+0s) by Moose::Meta::Role::Attribute::BEGIN@3 at line 3 of Moose/Meta/Role/Attribute.pm # once (3µs+0s) by Devel::StackTrace::BEGIN@5 at line 5 of Devel/StackTrace.pm # once (3µs+0s) by Class::MOP::Method::Inlined::BEGIN@3 at line 3 of Class/MOP/Method/Inlined.pm # once (3µs+0s) by MooseX::ClassAttribute::Role::Meta::Class::BEGIN@3 at line 3 of MooseX/ClassAttribute/Role/Meta/Class.pm # once (3µs+0s) by Moose::Meta::Role::Application::ToClass::BEGIN@3 at line 3 of Moose/Meta/Role/Application/ToClass.pm # once (3µs+0s) by Moose::Meta::TypeCoercion::BEGIN@4 at line 4 of Moose/Meta/TypeCoercion.pm # once (3µs+0s) by Test::Builder::BEGIN@4 at line 4 of Test/Builder.pm # once (3µs+0s) by DateTime::TimeZone::Catalog::BEGIN@10 at line 10 of DateTime/TimeZone/Catalog.pm # once (3µs+0s) by Moose::Meta::TypeConstraint::DuckType::BEGIN@3 at line 3 of Moose/Meta/TypeConstraint/DuckType.pm # once (3µs+0s) by Class::MOP::BEGIN@4 at line 4 of Class/MOP.pm # once (3µs+0s) by Moose::Meta::TypeCoercion::Union::BEGIN@4 at line 4 of Moose/Meta/TypeCoercion/Union.pm # once (3µs+0s) by Test::Deep::BEGIN@1 at line 1 of Test/Deep/ArrayLengthOnly.pm # once (3µs+0s) by Moose::Meta::Method::Overridden::BEGIN@3 at line 3 of Moose/Meta/Method/Overridden.pm # once (3µs+0s) by Test::Deep::Cache::BEGIN@1 at line 1 of Test/Deep/Cache/Simple.pm # once (3µs+0s) by JSON::BEGIN@4 at line 4 of JSON.pm # once (3µs+0s) by Class::MOP::Instance::BEGIN@4 at line 4 of Class/MOP/Instance.pm # once (3µs+0s) by Moose::Error::Default::BEGIN@3 at line 3 of Moose/Error/Default.pm # once (3µs+0s) by Moose::Meta::TypeConstraint::Registry::BEGIN@4 at line 4 of Moose/Meta/TypeConstraint/Registry.pm # once (3µs+0s) by DateTime::TimeZone::OffsetOnly::BEGIN@3 at line 3 of DateTime/TimeZone/OffsetOnly.pm # once (3µs+0s) by Moose::Object::BEGIN@4 at line 4 of Moose/Object.pm # once (3µs+0s) by Moose::Meta::TypeConstraint::Parameterizable::BEGIN@3 at line 3 of Moose/Meta/TypeConstraint/Parameterizable.pm # once (3µs+0s) by Moose::Meta::Class::BEGIN@4 at line 4 of Moose/Meta/Class.pm # once (3µs+0s) by IO::Handle::BEGIN@261 at line 261 of IO/Handle.pm # once (3µs+0s) by File::Find::BEGIN@424 at line 424 of File/Find.pm # once (3µs+0s) by Moose::Meta::Role::Method::Required::BEGIN@4 at line 4 of Moose/Meta/Role/Method/Required.pm # once (3µs+0s) by Test::Deep::Stack::BEGIN@1 at line 1 of Test/Deep/MM.pm # once (3µs+0s) by Moose::Meta::TypeConstraint::Union::BEGIN@4 at line 4 of Moose/Meta/TypeConstraint/Union.pm # once (3µs+0s) by File::GlobMapper::BEGIN@3 at line 3 of File/GlobMapper.pm # once (3µs+0s) by Digest::MD5::BEGIN@3 at line 3 of Digest/MD5.pm # once (3µs+0s) by Data::OptList::BEGIN@3 at line 3 of Data/OptList.pm # once (3µs+0s) by Carp::Clan::BEGIN@16 at line 16 of Carp/Clan.pm # once (3µs+0s) by DateTime::Locale::root::BEGIN@21 at line 21 of DateTime/Locale/root.pm # once (3µs+0s) by DateTime::Locale::en::BEGIN@21 at line 21 of DateTime/Locale/en.pm # once (3µs+0s) by Class::MOP::Method::BEGIN@4 at line 4 of Class/MOP/Method.pm # once (3µs+0s) by DateTime::TimeZone::UTC::BEGIN@3 at line 3 of DateTime/TimeZone/UTC.pm # once (3µs+0s) by Moose::Meta::TypeConstraint::Enum::BEGIN@3 at line 3 of Moose/Meta/TypeConstraint/Enum.pm # once (3µs+0s) by Moose::Meta::Role::Application::ToRole::BEGIN@3 at line 3 of Moose/Meta/Role/Application/ToRole.pm # once (3µs+0s) by Moose::Meta::Role::Application::RoleSummation::BEGIN@3 at line 3 of Moose/Meta/Role/Application/RoleSummation.pm # once (3µs+0s) by DateTime::Helpers::BEGIN@3 at line 3 of DateTime/Helpers.pm # once (3µs+0s) by DateTime::Locale::Base::BEGIN@3 at line 3 of DateTime/Locale/Base.pm # once (3µs+0s) by MRO::Compat::BEGIN@2 at line 2 of MRO/Compat.pm # once (3µs+0s) by Test::Deep::BEGIN@1 at line 1 of Test/Deep/Cache.pm # once (3µs+0s) by Class::MOP::Package::BEGIN@4 at line 4 of Class/MOP/Package.pm # once (3µs+0s) by File::Find::BEGIN@3 at line 3 of File/Find.pm # once (3µs+0s) by Scalar::Util::BEGIN@9 at line 9 of Scalar/Util.pm # once (3µs+0s) by Moose::Meta::Method::BEGIN@3 at line 3 of Moose/Meta/Method.pm # once (3µs+0s) by IO::Socket::BEGIN@14 at line 14 of IO/Socket.pm # once (3µs+0s) by Memcached::libmemcached::BEGIN@4 at line 4 of Memcached/libmemcached.pm # once (3µs+0s) by IO::File::BEGIN@128 at line 128 of IO/File.pm # once (3µs+0s) by Class::ISA::BEGIN@3 at line 3 of Class/ISA.pm # once (3µs+0s) by Config::BEGIN@5 at line 5 of Config_heavy.pl # once (3µs+0s) by File::Spec::BEGIN@3 at line 3 of File/Spec.pm # once (2µs+0s) by Variable::Magic::BEGIN@5 at line 5 of Variable/Magic.pm # once (2µs+0s) by MooseX::ClassAttribute::Meta::Method::Accessor::BEGIN@3 at line 3 of MooseX/ClassAttribute/Meta/Method/Accessor.pm # once (2µs+0s) by metaclass::BEGIN@4 at line 4 of metaclass.pm # once (2µs+0s) by HTTP::Status::BEGIN@3 at line 3 of HTTP/Status.pm # once (2µs+0s) by URI::_punycode::BEGIN@3 at line 3 of URI/_punycode.pm # once (2µs+0s) by constant::BEGIN@3 at line 3 of constant.pm # once (2µs+0s) by Errno::BEGIN@9 at line 9 of Errno.pm # once (2µs+0s) by Exception::Class::Base::BEGIN@3 at line 3 of Exception/Class/Base.pm # once (2µs+0s) by IO::Seekable::BEGIN@99 at line 99 of IO/Seekable.pm # once (2µs+0s) by Params::Util::BEGIN@59 at line 59 of Params/Util.pm # once (2µs+0s) by Exception::Class::BEGIN@5 at line 5 of Exception/Class.pm # once (2µs+0s) by MooseX::Types::Util::BEGIN@10 at line 10 of MooseX/Types/Util.pm # once (2µs+0s) by SimpleDB::Class::Types::BEGIN@71 at line 71 of ../lib/SimpleDB/Class/Types.pm # once (2µs+0s) by IO::BEGIN@7 at line 7 of IO.pm # once (2µs+0s) by UUID::Tiny::BEGIN@5 at line 5 of UUID/Tiny.pm # once (2µs+0s) by MooseX::Types::Moose::BEGIN@10 at line 10 of MooseX/Types/Moose.pm # once (2µs+0s) by namespace::clean::BEGIN@10 at line 10 of namespace/clean.pm # once (2µs+0s) by Sub::Install::BEGIN@4 at line 4 of Sub/Install.pm sub import {
35 | 556 | 1.77ms |  |  | shift;
36 |  |  |  |  | $^H |= @_ ? bits(@_) : $default_bits; # spent 26µs making 3 calls to strict::bits, avg 9µs/call
37 |  |  |  |  | }
38 |  |  |  |  |
39 |  |  |  |  | # spent 1.13ms (607µs+522µs) within strict::unimport which was called 75 times, avg 15µs/call: # once (22µs+19µs) by Compress::Raw::Zlib::BEGIN@78 at line 78 of Compress/Raw/Zlib.pm # once (20µs+16µs) by utf8::BEGIN@76 at line 76 of utf8_heavy.pl # once (18µs+15µs) by Cwd::BEGIN@811 at line 811 of Cwd.pm # once (18µs+11µs) by Test::Builder::BEGIN@1540 at line 1540 of Test/Builder.pm # once (12µs+13µs) by Test::Deep::Cmp::BEGIN@20 at line 20 of Test/Deep/Cmp.pm # once (13µs+11µs) by utf8::BEGIN@155 at line 155 of utf8_heavy.pl # once (13µs+10µs) by Test::Builder::BEGIN@2107 at line 2107 of Test/Builder.pm # once (11µs+10µs) by Moose::Exporter::BEGIN@206 at line 206 of Moose/Exporter.pm # once (11µs+10µs) by MRO::Compat::BEGIN@225 at line 225 of MRO/Compat.pm # once (10µs+10µs) by JSON::BEGIN@284 at line 284 of JSON.pm # once (13µs+7µs) by Config::BEGIN@35 at line 35 of Config.pm # once (10µs+9µs) by HTTP::Message::BEGIN@621 at line 621 of HTTP/Message.pm # once (10µs+9µs) by MooseX::ClassAttribute::Role::Meta::Class::BEGIN@186 at line 186 of MooseX/ClassAttribute/Role/Meta/Class.pm # once (10µs+9µs) by Carp::Clan::BEGIN@224 at line 224 of Carp/Clan.pm # once (10µs+9µs) by Moose::Object::BEGIN@80 at line 80 of Moose/Object.pm # once (9µs+9µs) by Errno::BEGIN@162 at line 162 of Errno.pm # once (9µs+9µs) by SimpleDB::Class::Item::BEGIN@25 at line 25 of ../lib/SimpleDB/Class/Item.pm # once (10µs+9µs) by MRO::Compat::BEGIN@256 at line 256 of MRO/Compat.pm # once (11µs+7µs) by Moose::Exporter::BEGIN@488 at line 488 of Moose/Exporter.pm # once (9µs+8µs) by Net::HTTP::Methods::BEGIN@98 at line 98 of Net/HTTP/Methods.pm # once (9µs+8µs) by DateTime::Infinite::BEGIN@14 at line 14 of DateTime/Infinite.pm # once (9µs+8µs) by AutoLoader::BEGIN@30 at line 30 of AutoLoader.pm # once (9µs+8µs) by Moose::Util::TypeConstraints::BEGIN@65 at line 65 of Moose/Util/TypeConstraints.pm # once (9µs+8µs) by Class::MOP::Class::Immutable::Trait::BEGIN@36 at line 36 of Class/MOP/Class/Immutable/Trait.pm # once (8µs+8µs) by Test::Deep::BEGIN@94 at line 94 of Test/Deep.pm # once (8µs+8µs) by LWP::Protocol::BEGIN@62 at line 62 of LWP/Protocol.pm # once (9µs+7µs) by Moose::Exporter::BEGIN@385 at line 385 of Moose/Exporter.pm # once (7µs+8µs) by JSON::Backend::XS::BEGIN@29 at line 29 of (eval 0)[JSON.pm:251] at line 251 of JSON.pm # once (7µs+8µs) by namespace::clean::BEGIN@320 at line 320 of namespace/clean.pm # once (7µs+8µs) by namespace::clean::BEGIN@170 at line 170 of namespace/clean.pm # once (7µs+7µs) by MooseX::Types::CheckedUtilExports::BEGIN@49 at line 49 of MooseX/Types/CheckedUtilExports.pm # once (8µs+7µs) by Exception::Class::Base::BEGIN@65 at line 65 of Exception/Class/Base.pm # once (6µs+8µs) by Moose::Exporter::BEGIN@498 at line 498 of Moose/Exporter.pm # once (7µs+7µs) by namespace::clean::BEGIN@340 at line 340 of namespace/clean.pm # once (9µs+5µs) by File::Spec::Unix::BEGIN@149 at line 149 of File/Spec/Unix.pm # once (7µs+6µs) by Class::MOP::Package::BEGIN@100 at line 100 of Class/MOP/Package.pm # once (7µs+6µs) by Class::ISA::BEGIN@13 at line 13 of Class/ISA.pm # once (6µs+6µs) by Moose::Meta::Role::BEGIN@559 at line 559 of Moose/Meta/Role.pm # once (7µs+6µs) by URI::BEGIN@127 at line 127 of URI.pm # once (6µs+6µs) by constant::BEGIN@38 at line 38 of constant.pm # once (6µs+6µs) by FileHandle::BEGIN@46 at line 46 of FileHandle.pm # once (7µs+5µs) by Sub::Install::BEGIN@184 at line 184 of Sub/Install.pm # once (6µs+6µs) by Carp::BEGIN@300 at line 300 of Carp/Heavy.pm # once (7µs+5µs) by IO::Handle::BEGIN@613 at line 613 of IO/Handle.pm # once (6µs+5µs) by Exception::Class::BEGIN@45 at line 45 of Exception/Class.pm # once (6µs+5µs) by Time::HiRes::BEGIN@42 at line 42 of Time/HiRes.pm # once (6µs+5µs) by Class::MOP::Module::BEGIN@64 at line 64 of Class/MOP/Module.pm # once (7µs+5µs) by Fcntl::BEGIN@239 at line 239 of Fcntl.pm # once (7µs+5µs) by LWP::UserAgent::BEGIN@353 at line 353 of LWP/UserAgent.pm # once (6µs+5µs) by AutoLoader::BEGIN@138 at line 138 of AutoLoader.pm # once (6µs+5µs) by MooseX::Types::Base::BEGIN@186 at line 186 of MooseX/Types/Base.pm # once (6µs+5µs) by Class::ISA::BEGIN@61 at line 61 of Class/ISA.pm # once (6µs+5µs) by Class::MOP::Class::BEGIN@257 at line 257 of Class/MOP/Class.pm # once (6µs+5µs) by Exception::Class::BEGIN@168 at line 168 of Exception/Class.pm # once (6µs+5µs) by DateTime::Locale::Base::BEGIN@138 at line 138 of DateTime/Locale/Base.pm # once (6µs+5µs) by MRO::Compat::BEGIN@116 at line 116 of MRO/Compat.pm # once (6µs+5µs) by JSON::Backend::PP::BEGIN@349 at line 349 of JSON.pm # once (6µs+5µs) by DateTime::Locale::Base::BEGIN@25 at line 25 of DateTime/Locale/Base.pm # once (5µs+5µs) by Exporter::Heavy::BEGIN@4 at line 4 of Exporter/Heavy.pm # once (6µs+5µs) by MooseX::Types::BEGIN@339 at line 339 of MooseX/Types.pm # once (6µs+5µs) by Exception::Class::Base::BEGIN@43 at line 43 of Exception/Class/Base.pm # once (6µs+5µs) by constant::BEGIN@101 at line 101 of constant.pm # once (6µs+5µs) by Class::MOP::Package::BEGIN@207 at line 207 of Class/MOP/Package.pm # once (5µs+5µs) by Devel::StackTraceFrame::BEGIN@252 at line 252 of Devel/StackTrace.pm # once (6µs+5µs) by AutoLoader::BEGIN@186 at line 186 of AutoLoader.pm # once (6µs+5µs) by JSON::Backend::XS::Supportable::BEGIN@90 at line 90 of (eval 0)[JSON.pm:251] at line 251 of JSON.pm # once (6µs+5µs) by Test::Deep::MM::BEGIN@16 at line 16 of Test/Deep/MM.pm # once (6µs+5µs) by Class::MOP::Package::BEGIN@145 at line 145 of Class/MOP/Package.pm # once (6µs+4µs) by MooseX::Types::Base::BEGIN@243 at line 243 of MooseX/Types/Base.pm # once (5µs+5µs) by Exception::Class::BEGIN@78 at line 78 of Exception/Class.pm # once (5µs+4µs) by Class::MOP::Package::BEGIN@152 at line 152 of Class/MOP/Package.pm # once (5µs+5µs) by Test::Deep::MM::BEGIN@31 at line 31 of Test/Deep/MM.pm # once (5µs+4µs) by MooseX::Types::Base::BEGIN@201 at line 201 of MooseX/Types/Base.pm # once (5µs+4µs) by JSON::Backend::XS::BEGIN@42 at line 42 of (eval 0)[JSON.pm:251] at line 251 of JSON.pm # once (5µs+0s) by POSIX::BEGIN@39 at line 39 of POSIX.pm sub unimport {
40 | 150 | 584µs |  |  | shift;
41 |  |  |  |  | $^H &= ~ (@_ ? bits(@_) : $default_bits); # spent 522µs making 74 calls to strict::bits, avg 7µs/call
42 |  |  |  |  | }
43 |  |  |  |  |
44 | 1 | 24µs |  |  | 1;
45 |  |  |  |  | __END__
46 |  |  |  |  |
47 |  |  |  |  | =head1 NAME
48 |  |  |  |  |
49 |  |  |  |  | strict - Perl pragma to restrict unsafe constructs
50 |  |  |  |  |
51 |  |  |  |  | =head1 SYNOPSIS
52 |  |  |  |  |
53 |  |  |  |  | use strict;
54 |  |  |  |  |
55 |  |  |  |  | use strict "vars";
56 |  |  |  |  | use strict "refs";
57 |  |  |  |  | use strict "subs";
58 |  |  |  |  |
59 |  |  |  |  | use strict;
60 |  |  |  |  | no strict "vars";
61 |  |  |  |  |
62 |  |  |  |  | =head1 DESCRIPTION
63 |  |  |  |  |
64 |  |  |  |  | If no import list is supplied, all possible restrictions are assumed.
65 |  |  |  |  | (This is the safest mode to operate in, but is sometimes too strict for
66 |  |  |  |  | casual programming.) Currently, there are three possible things to be
67 |  |  |  |  | strict about: "subs", "vars", and "refs".
68 |  |  |  |  |
69 |  |  |  |  | =over 6
70 |  |  |  |  |
71 |  |  |  |  | =item C<strict refs>
72 |  |  |  |  |
73 |  |  |  |  | This generates a runtime error if you
74 |  |  |  |  | use symbolic references (see L<perlref>).
75 |  |  |  |  |
76 |  |  |  |  | use strict 'refs';
77 |  |  |  |  | $ref = \$foo;
78 |  |  |  |  | print $$ref; # ok
79 |  |  |  |  | $ref = "foo";
80 |  |  |  |  | print $$ref; # runtime error; normally ok
81 |  |  |  |  | $file = "STDOUT";
82 |  |  |  |  | print $file "Hi!"; # error; note: no comma after $file
83 |  |  |  |  |
84 |  |  |  |  | There is one exception to this rule:
85 |  |  |  |  |
86 |  |  |  |  | $bar = \&{'foo'};
87 |  |  |  |  | &$bar;
88 |  |  |  |  |
89 |  |  |  |  | is allowed so that C<goto &$AUTOLOAD> would not break under stricture.
90 |  |  |  |  |
91 |  |  |  |  |
92 |  |  |  |  | =item C<strict vars>
93 |  |  |  |  |
94 |  |  |  |  | This generates a compile-time error if you access a variable that wasn't
95 |  |  |  |  | declared via C<our> or C<use vars>,
96 |  |  |  |  | localized via C<my()>, or wasn't fully qualified. Because this is to avoid
97 |  |  |  |  | variable suicide problems and subtle dynamic scoping issues, a merely
98 |  |  |  |  | local() variable isn't good enough. See L<perlfunc/my> and
99 |  |  |  |  | L<perlfunc/local>.
100 |  |  |  |  |
101 |  |  |  |  | use strict 'vars';
102 |  |  |  |  | $X::foo = 1; # ok, fully qualified
103 |  |  |  |  | my $foo = 10; # ok, my() var
104 |  |  |  |  | local $foo = 9; # blows up
105 |  |  |  |  |
106 |  |  |  |  | package Cinna;
107 |  |  |  |  | our $bar; # Declares $bar in current package
108 |  |  |  |  | $bar = 'HgS'; # ok, global declared via pragma
109 |  |  |  |  |
110 |  |  |  |  | The local() generated a compile-time error because you just touched a global
111 |  |  |  |  | name without fully qualifying it.
112 |  |  |  |  |
113 |  |  |  |  | Because of their special use by sort(), the variables $a and $b are
114 |  |  |  |  | exempted from this check.
115 |  |  |  |  |
116 |  |  |  |  | =item C<strict subs>
117 |  |  |  |  |
118 |  |  |  |  | This disables the poetry optimization, generating a compile-time error if
119 |  |  |  |  | you try to use a bareword identifier that's not a subroutine, unless it
120 |  |  |  |  | is a simple identifier (no colons) and that it appears in curly braces or
121 |  |  |  |  | on the left hand side of the C<< => >> symbol.
122 |  |  |  |  |
123 |  |  |  |  | use strict 'subs';
124 |  |  |  |  | $SIG{PIPE} = Plumber; # blows up
125 |  |  |  |  | $SIG{PIPE} = "Plumber"; # just fine: quoted string is always ok
126 |  |  |  |  | $SIG{PIPE} = \&Plumber; # preferred form
127 |  |  |  |  |
128 |  |  |  |  | =back
129 |  |  |  |  |
130 |  |  |  |  | See L<perlmodlib/Pragmatic Modules>.
131 |  |  |  |  |
132 |  |  |  |  | =head1 HISTORY
133 |  |  |  |  |
134 |  |  |  |  | C<strict 'subs'>, with Perl 5.6.1, erroneously permitted to use an unquoted
135 |  |  |  |  | compound identifier (e.g. C<Foo::Bar>) as a hash key (before C<< => >> or
136 |  |  |  |  | inside curlies), but without forcing it always to a literal string.
137 |  |  |  |  |
138 |  |  |  |  | Starting with Perl 5.8.1 strict is strict about its restrictions:
139 |  |  |  |  | if unknown restrictions are used, the strict pragma will abort with
140 |  |  |  |  |
141 |  |  |  |  | Unknown 'strict' tag(s) '...'
142 |  |  |  |  |
143 |  |  |  |  | As of version 1.04 (Perl 5.10), strict verifies that it is used as
144 |  |  |  |  | "strict" to avoid the dreaded Strict trap on case insensitive file
145 |  |  |  |  | systems.
146 |  |  |  |  |
147 |  |  |  |  | =cut
|  |  |  |  | # spent 14µs within strict::CORE:match which was called # once (14µs+0s) by Test::More::BEGIN@4 at line 6 of strict.pm sub strict::CORE:match; # xsub
|  |  |  |  | # spent 40µs within strict::CORE:regcomp which was called # once (40µs+0s) by Test::More::BEGIN@4 at line 6 of strict.pm sub strict::CORE:regcomp; # xsub