Filename | /Users/ap13/perl5/lib/perl5/darwin-2level/Scalar/Util.pm |
Statements | Executed 13 statements in 1.53ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
5083 | 41 | 23 | 4.45ms | 4.45ms | blessed (xsub) | Scalar::Util::
2156 | 14 | 11 | 2.44ms | 2.44ms | weaken (xsub) | Scalar::Util::
1428 | 5 | 4 | 974µs | 974µs | reftype (xsub) | Scalar::Util::
317 | 1 | 1 | 284µs | 284µs | isweak (xsub) | Scalar::Util::
72 | 2 | 2 | 52µs | 52µs | refaddr (xsub) | Scalar::Util::
1 | 1 | 1 | 20µs | 61µs | BEGIN@9 | Scalar::Util::
0 | 0 | 0 | 0s | 0s | export_fail | Scalar::Util::
0 | 0 | 0 | 0s | 0s | set_prototype | Scalar::Util::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | # Copyright (c) 1997-2007 Graham Barr <gbarr@pobox.com>. All rights reserved. | ||||
2 | # This program is free software; you can redistribute it and/or | ||||
3 | # modify it under the same terms as Perl itself. | ||||
4 | # | ||||
5 | # Maintained since 2013 by Paul Evans <leonerd@leonerd.org.uk> | ||||
6 | |||||
7 | package Scalar::Util; | ||||
8 | |||||
9 | 2 | 447µs | 2 | 103µs | # spent 61µs (20+42) within Scalar::Util::BEGIN@9 which was called:
# once (20µs+42µs) by Moose::BEGIN@9 at line 9 # spent 61µs making 1 call to Scalar::Util::BEGIN@9
# spent 42µs making 1 call to strict::import |
10 | 1 | 913µs | require Exporter; | ||
11 | 1 | 106µs | require List::Util; # List::Util loads the XS | ||
12 | |||||
13 | 1 | 9µs | our @ISA = qw(Exporter); | ||
14 | 1 | 5µs | our @EXPORT_OK = qw( | ||
15 | blessed refaddr reftype weaken unweaken isweak | ||||
16 | |||||
17 | dualvar isdual isvstring looks_like_number openhandle readonly set_prototype | ||||
18 | tainted | ||||
19 | ); | ||||
20 | 1 | 600ns | our $VERSION = "1.41"; | ||
21 | 1 | 21µs | $VERSION = eval $VERSION; # spent 3µs executing statements in string eval | ||
22 | |||||
23 | 1 | 200ns | our @EXPORT_FAIL; | ||
24 | |||||
25 | 1 | 500ns | unless (defined &weaken) { | ||
26 | push @EXPORT_FAIL, qw(weaken); | ||||
27 | } | ||||
28 | 1 | 300ns | unless (defined &isweak) { | ||
29 | push @EXPORT_FAIL, qw(isweak isvstring); | ||||
30 | } | ||||
31 | 1 | 300ns | unless (defined &isvstring) { | ||
32 | push @EXPORT_FAIL, qw(isvstring); | ||||
33 | } | ||||
34 | |||||
35 | sub export_fail { | ||||
36 | if (grep { /^(?:weaken|isweak)$/ } @_ ) { | ||||
37 | require Carp; | ||||
38 | Carp::croak("Weak references are not implemented in the version of perl"); | ||||
39 | } | ||||
40 | |||||
41 | if (grep { /^isvstring$/ } @_ ) { | ||||
42 | require Carp; | ||||
43 | Carp::croak("Vstrings are not implemented in the version of perl"); | ||||
44 | } | ||||
45 | |||||
46 | @_; | ||||
47 | } | ||||
48 | |||||
49 | # set_prototype has been moved to Sub::Util with a different interface | ||||
50 | sub set_prototype(&$) | ||||
51 | { | ||||
52 | my ( $code, $proto ) = @_; | ||||
53 | return Sub::Util::set_prototype( $proto, $code ); | ||||
54 | } | ||||
55 | |||||
56 | 1 | 28µs | 1; | ||
57 | |||||
58 | __END__ | ||||
# spent 4.45ms within Scalar::Util::blessed which was called 5083 times, avg 875ns/call:
# 656 times (737µs+0s) by Class::MOP::Mixin::HasMethods::add_method at line 54 of Class/MOP/Mixin/HasMethods.pm, avg 1µs/call
# 467 times (231µs+0s) by Moose::Meta::Attribute::_new or Moose::Meta::Instance::_new or Moose::Meta::Method::_new or Moose::Meta::Role::Application::ToClass::_new or Moose::Meta::Role::Method::_new or Moose::Meta::Role::_new or Moose::Meta::TypeConstraint::Class::_new or Moose::Meta::TypeConstraint::Parameterizable::_new or Moose::Meta::TypeConstraint::Parameterized::_new or Moose::Meta::TypeConstraint::Role::_new or Moose::Meta::TypeConstraint::_new at line 6 of (eval 25)[Eval/Closure.pm:125], avg 496ns/call
# 445 times (328µs+0s) by Bio::Roary::AnalyseGroups::meta or Bio::Roary::AnnotateGroups::meta or Bio::Roary::CommandLine::RoaryPostAnalysis::meta or Bio::Roary::ContigsToGeneIDsFromGFF::meta or Bio::Roary::External::ProteinMuscleAlignmentFromNucleotides::meta or Bio::Roary::GeneNamesFromGFF::meta or Bio::Roary::GroupLabels::meta or Bio::Roary::GroupStatistics::meta or Bio::Roary::InflateClusters::meta or Bio::Roary::OrderGenes::meta or Bio::Roary::Output::EmblGroups::meta or Bio::Roary::Output::GroupsMultifastaNucleotide::meta or Bio::Roary::Output::GroupsMultifastasNucleotide::meta or Bio::Roary::Output::NumberOfGroups::meta or Bio::Roary::PostAnalysis::meta or Bio::Roary::SplitGroups::meta or Class::MOP::Mixin::meta or Class::MOP::Object::meta or Moose::Meta::Role::Application::RoleSummation::meta or Moose::Meta::Role::Application::ToClass::meta or Moose::Meta::Role::Application::ToInstance::meta or Moose::Meta::Role::Application::ToRole::meta or Moose::Meta::Role::Application::meta or Moose::Meta::Role::Composite::meta or Moose::Meta::Role::Method::Required::meta or Moose::Meta::Role::meta or Moose::Meta::TypeCoercion::Union::meta or Moose::Meta::TypeCoercion::meta or Moose::Meta::TypeConstraint::Class::meta or Moose::Meta::TypeConstraint::DuckType::meta or Moose::Meta::TypeConstraint::Enum::meta or Moose::Meta::TypeConstraint::Parameterizable::meta or Moose::Meta::TypeConstraint::Parameterized::meta or Moose::Meta::TypeConstraint::Registry::meta or Moose::Meta::TypeConstraint::Role::meta or Moose::Meta::TypeConstraint::Union::meta or Moose::Meta::TypeConstraint::meta at line 42 of Class/MOP/Method/Meta.pm, avg 736ns/call
# 394 times (392µs+0s) by Class::MOP::Method::Accessor::new at line 26 of Class/MOP/Method/Accessor.pm, avg 995ns/call
# 352 times (190µs+0s) by Moose::Meta::Attribute::_process_isa_option at line 333 of Moose/Meta/Attribute.pm, avg 541ns/call
# 333 times (335µs+0s) by Class::MOP::Mixin::HasAttributes::add_attribute at line 14 of Class/MOP/Mixin/HasAttributes.pm, avg 1µs/call
# 320 times (282µs+0s) by Class::MOP::Attribute::attach_to_class at line 252 of Class/MOP/Attribute.pm, avg 882ns/call
# 295 times (182µs+0s) by Class::MOP::class_of at line 57 of Class/MOP.pm, avg 618ns/call
# 272 times (158µs+0s) by Moose::Util::TypeConstraints::find_type_constraint at line 298 of Moose/Util/TypeConstraints.pm, avg 583ns/call
# 271 times (325µs+0s) by Class::MOP::Class::_construct_instance at line 508 of Class/MOP/Class.pm, avg 1µs/call
# 237 times (156µs+0s) by Class::MOP::Instance::BUILDARGS at line 17 of Class/MOP/Instance.pm, avg 658ns/call
# 233 times (193µs+0s) by Class::MOP::Method::wrap at line 26 of Class/MOP/Method.pm, avg 829ns/call
# 228 times (253µs+0s) by Class::MOP::Mixin::HasMethods::get_method at line 114 of Class/MOP/Mixin/HasMethods.pm, avg 1µs/call
# 189 times (115µs+0s) by Moose::Meta::Class::add_attribute at line 569 of Moose/Meta/Class.pm, avg 609ns/call
# 59 times (62µs+0s) by Class::MOP::Mixin::meta at line 12 of Class/MOP/Mixin.pm, avg 1µs/call
# 48 times (60µs+0s) by Moose::Meta::TypeConstraint::Registry::add_type_constraint at line 47 of Moose/Meta/TypeConstraint/Registry.pm, avg 1µs/call
# 44 times (38µs+0s) by Class::MOP::Method::Wrapped::wrap at line 69 of Class/MOP/Method/Wrapped.pm, avg 864ns/call
# 32 times (33µs+0s) by Class::MOP::Method::clone at line 134 of Class/MOP/Method.pm, avg 1µs/call
# 30 times (36µs+0s) by Class::MOP::Method::Constructor::new at line 16 of Class/MOP/Method/Constructor.pm, avg 1µs/call
# 29 times (117µs+0s) by Bio::Roary::AnalyseGroups::DESTROY or Bio::Roary::AnnotateGroups::DESTROY or Bio::Roary::CommandLine::RoaryPostAnalysis::DESTROY or Bio::Roary::ContigsToGeneIDsFromGFF::DESTROY or Bio::Roary::GeneNamesFromGFF::DESTROY or Bio::Roary::GroupLabels::DESTROY or Bio::Roary::GroupStatistics::DESTROY or Bio::Roary::InflateClusters::DESTROY or Bio::Roary::OrderGenes::DESTROY or Bio::Roary::Output::EmblGroups::DESTROY or Bio::Roary::Output::NumberOfGroups::DESTROY or Bio::Roary::PostAnalysis::DESTROY or Bio::Roary::SplitGroups::DESTROY at line 5 of (eval 25)[Eval/Closure.pm:125], avg 4µs/call
# 29 times (73µs+0s) by Bio::Roary::AnalyseGroups::new or Bio::Roary::AnnotateGroups::new or Bio::Roary::CommandLine::RoaryPostAnalysis::new or Bio::Roary::ContigsToGeneIDsFromGFF::new or Bio::Roary::GeneNamesFromGFF::new or Bio::Roary::GroupLabels::new or Bio::Roary::GroupStatistics::new or Bio::Roary::InflateClusters::new or Bio::Roary::OrderGenes::new or Bio::Roary::Output::EmblGroups::new or Bio::Roary::Output::NumberOfGroups::new or Bio::Roary::PostAnalysis::new or Bio::Roary::SplitGroups::new at line 12 of (eval 25)[Eval/Closure.pm:125], avg 3µs/call
# 26 times (11µs+0s) by Moose::Meta::Role::add_attribute at line 238 of Moose/Meta/Role.pm, avg 438ns/call
# 16 times (22µs+0s) by Moose::Meta::Method::Destructor::is_needed at line 61 of Moose/Meta/Method/Destructor.pm, avg 1µs/call
# 16 times (10µs+0s) by Moose::Util::TypeConstraints::_create_type_constraint at line 572 of Moose/Util/TypeConstraints.pm, avg 612ns/call
# 13 times (9µs+0s) by Moose::Meta::Role::Attribute::attach_to_role at line 70 of Moose/Meta/Role/Attribute.pm, avg 708ns/call
# 10 times (33µs+0s) by Bio::Roary::GroupStatistics::_text_csv_obj or Bio::Roary::OrderGenes::group_graphs or Bio::Roary::PostAnalysis::_analyse_groups_obj or Bio::Roary::PostAnalysis::_annotate_groups_obj or Bio::Roary::PostAnalysis::_group_labels_obj or Bio::Roary::PostAnalysis::_group_statistics_obj or Bio::Roary::PostAnalysis::_inflate_clusters_obj or Bio::Roary::PostAnalysis::_number_of_groups_obj or Bio::Roary::PostAnalysis::_order_genes_obj or Bio::Roary::PostAnalysis::_split_groups_obj at line 19 of (eval 25)[Eval/Closure.pm:125], avg 3µs/call
# 4 times (6µs+0s) by Moose::Util::_apply_all_roles at line 164 of Moose/Util.pm, avg 2µs/call
# 4 times (6µs+0s) by Moose::Meta::Class::add_role_application at line 197 of Moose/Meta/Class.pm, avg 2µs/call
# 4 times (4µs+0s) by Moose::Meta::Class::add_role at line 181 of Moose/Meta/Class.pm, avg 1µs/call
# 4 times (4µs+0s) by Moose::Util::_apply_all_roles at line 143 of Moose/Util.pm, avg 900ns/call
# 4 times (3µs+0s) by Moose::Meta::Role::apply at line 445 of Moose/Meta/Role.pm, avg 700ns/call
# 4 times (2µs+0s) by Moose::Util::_apply_all_roles at line 168 of Moose/Util.pm, avg 625ns/call
# 3 times (9µs+0s) by Bio::Roary::Output::EmblGroups::new or Bio::Roary::SplitGroups::new at line 64 of (eval 25)[Eval/Closure.pm:125], avg 3µs/call
# 2 times (8µs+0s) by Bio::Roary::GroupStatistics::new or Bio::Roary::Output::NumberOfGroups::new at line 98 of (eval 25)[Eval/Closure.pm:125], avg 4µs/call
# 2 times (4µs+0s) by Bio::Roary::Output::EmblGroups::new at line 74 of (eval 25)[Eval/Closure.pm:125], avg 2µs/call
# 2 times (3µs+0s) by Moose::Meta::TypeConstraint::Parameterized::compile_type_constraint at line 50 of Moose/Meta/TypeConstraint/Parameterized.pm, avg 2µs/call
# 2 times (2µs+0s) by Class::MOP::Mixin::HasMethods::remove_method at line 146 of Class/MOP/Mixin/HasMethods.pm, avg 800ns/call
# once (8µs+0s) by Bio::Roary::GroupStatistics::new at line 88 of (eval 25)[Eval/Closure.pm:125]
# once (2µs+0s) by Bio::Roary::OrderGenes::new at line 94 of (eval 25)[Eval/Closure.pm:125]
# once (2µs+0s) by Sub::Install::_CODELIKE at line 98 of Sub/Install.pm
# once (1µs+0s) by Bio::Roary::Output::NumberOfGroups::new at line 108 of (eval 25)[Eval/Closure.pm:125] | |||||
# spent 284µs within Scalar::Util::isweak which was called 317 times, avg 895ns/call:
# 317 times (284µs+0s) by Class::MOP::metaclass_is_weak at line 50 of Class/MOP.pm, avg 895ns/call | |||||
# spent 52µs within Scalar::Util::refaddr which was called 72 times, avg 719ns/call:
# 40 times (25µs+0s) by Moose::Meta::TypeConstraint::__ANON__[/Users/ap13/perl5/lib/perl5/darwin-2level/Moose/Meta/TypeConstraint.pm:8] at line 8 of Moose/Meta/TypeConstraint.pm, avg 635ns/call
# 32 times (26µs+0s) by Class::MOP::Method::Inlined::can_be_inlined at line 68 of Class/MOP/Method/Inlined.pm, avg 825ns/call | |||||
# spent 974µs within Scalar::Util::reftype which was called 1428 times, avg 682ns/call:
# 435 times (237µs+0s) by Eval::Closure::_validate_env at line 73 of Eval/Closure.pm, avg 545ns/call
# 362 times (313µs+0s) by Eval::Closure::_canonicalize_source at line 49 of Eval/Closure.pm, avg 865ns/call
# 323 times (191µs+0s) by Sub::Install::_CODELIKE at line 98 of Sub/Install.pm, avg 590ns/call
# 233 times (169µs+0s) by Class::MOP::Method::wrap at line 26 of Class/MOP/Method.pm, avg 724ns/call
# 75 times (65µs+0s) by Class::MOP::Mixin::HasMethods::wrap_method_body at line 36 of Class/MOP/Mixin/HasMethods.pm, avg 864ns/call | |||||
# spent 2.44ms within Scalar::Util::weaken which was called 2156 times, avg 1µs/call:
# 633 times (542µs+0s) by Class::MOP::Method::attach_to_class at line 76 of Class/MOP/Method.pm, avg 856ns/call
# 394 times (484µs+0s) by Class::MOP::Method::Accessor::new at line 41 of Class/MOP/Method/Accessor.pm, avg 1µs/call
# 320 times (342µs+0s) by Class::MOP::Attribute::attach_to_class at line 256 of Class/MOP/Attribute.pm, avg 1µs/call
# 237 times (214µs+0s) by Class::MOP::Instance::new at line 41 of Class/MOP/Instance.pm, avg 904ns/call
# 224 times (374µs+0s) by Graph::AdjacencyMap::Light::_new at line 31 of Graph/AdjacencyMap/Light.pm, avg 2µs/call
# 189 times (290µs+0s) by Class::MOP::Method::wrap at line 47 of Class/MOP/Method.pm, avg 2µs/call
# 44 times (56µs+0s) by Class::MOP::Method::Meta::_generate_meta_method at line 23 of Class/MOP/Method/Meta.pm, avg 1µs/call
# 32 times (51µs+0s) by Class::MOP::Method::clone at line 135 of Class/MOP/Method.pm, avg 2µs/call
# 30 times (33µs+0s) by Class::MOP::Method::Constructor::new at line 32 of Class/MOP/Method/Constructor.pm, avg 1µs/call
# 16 times (18µs+0s) by Moose::Meta::Method::Destructor::new at line 44 of Moose/Meta/Method/Destructor.pm, avg 1µs/call
# 16 times (18µs+0s) by Moose::Meta::Method::Constructor::new at line 43 of Moose/Meta/Method/Constructor.pm, avg 1µs/call
# 13 times (10µs+0s) by Moose::Meta::Role::Attribute::attach_to_role at line 75 of Moose/Meta/Role/Attribute.pm, avg 754ns/call
# 4 times (4µs+0s) by Moose::Meta::Role::Application::ToClass::apply at line 28 of Moose/Meta/Role/Application/ToClass.pm, avg 1µs/call
# 4 times (3µs+0s) by Moose::Meta::Role::Application::ToClass::apply at line 29 of Moose/Meta/Role/Application/ToClass.pm, avg 800ns/call |