| Filename | /home/ss5/perl5/perlbrew/perls/perl-5.22.0/lib/site_perl/5.22.0/x86_64-linux/Moose.pm |
| Statements | Executed 161 statements in 2.38ms |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 4.09ms | 4.78ms | Moose::BEGIN@38 |
| 1 | 1 | 1 | 2.23ms | 12.5ms | Moose::BEGIN@24 |
| 1 | 1 | 1 | 2.21ms | 76.6ms | Moose::BEGIN@15 |
| 1 | 1 | 1 | 1.94ms | 9.78ms | Moose::BEGIN@32 |
| 1 | 1 | 1 | 1.18ms | 4.72ms | Moose::BEGIN@25 |
| 1 | 1 | 1 | 1.02ms | 1.69ms | Moose::BEGIN@35 |
| 1 | 1 | 1 | 987µs | 1.06ms | Moose::BEGIN@11 |
| 1 | 1 | 1 | 734µs | 8.26ms | Moose::BEGIN@12 |
| 1 | 1 | 1 | 666µs | 2.36ms | Moose::BEGIN@33 |
| 1 | 1 | 1 | 601µs | 1.43ms | Moose::BEGIN@36 |
| 1 | 1 | 1 | 598µs | 6.93ms | Moose::BEGIN@30 |
| 1 | 1 | 1 | 478µs | 1.57ms | Moose::BEGIN@34 |
| 1 | 1 | 1 | 461µs | 939µs | Moose::BEGIN@37 |
| 1 | 1 | 1 | 459µs | 82.8ms | Moose::BEGIN@26 |
| 1 | 1 | 1 | 214µs | 922µs | Moose::BEGIN@43 |
| 1 | 1 | 1 | 164µs | 947µs | Moose::BEGIN@28 |
| 1 | 1 | 1 | 134µs | 1.98ms | Moose::BEGIN@14 |
| 1 | 1 | 1 | 44µs | 1.83ms | Moose::init_meta |
| 1 | 1 | 1 | 10µs | 10µs | Moose::BEGIN@7 |
| 1 | 1 | 1 | 9µs | 11µs | DBIx::MultiStatementDo::BEGIN@1 |
| 1 | 1 | 1 | 9µs | 75µs | Moose::BEGIN@41 |
| 1 | 1 | 1 | 6µs | 51µs | Moose::BEGIN@10 |
| 1 | 1 | 1 | 6µs | 771µs | Moose::BEGIN@40 |
| 1 | 1 | 1 | 5µs | 11µs | DBIx::MultiStatementDo::BEGIN@2 |
| 1 | 1 | 1 | 3µs | 3µs | Moose::BEGIN@17 |
| 1 | 1 | 1 | 3µs | 3µs | Moose::BEGIN@27 |
| 1 | 1 | 1 | 2µs | 2µs | Moose::BEGIN@9 |
| 1 | 1 | 1 | 2µs | 2µs | Moose::BEGIN@19 |
| 0 | 0 | 0 | 0s | 0s | Moose::_get_caller |
| 0 | 0 | 0 | 0s | 0s | Moose::inner |
| 0 | 0 | 0 | 0s | 0s | Moose::super |
| 0 | 0 | 0 | 0s | 0s | Moose::throw_error |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | 2 | 16µs | 2 | 13µs | # spent 11µs (9+2) within DBIx::MultiStatementDo::BEGIN@1 which was called:
# once (9µs+2µs) by DBIx::MultiStatementDo::BEGIN@8 at line 1 # spent 11µs making 1 call to DBIx::MultiStatementDo::BEGIN@1
# spent 2µs making 1 call to strict::import |
| 2 | 2 | 31µs | 2 | 17µs | # spent 11µs (5+6) within DBIx::MultiStatementDo::BEGIN@2 which was called:
# once (5µs+6µs) by DBIx::MultiStatementDo::BEGIN@8 at line 2 # spent 11µs making 1 call to DBIx::MultiStatementDo::BEGIN@2
# spent 6µs making 1 call to warnings::import |
| 3 | package Moose; # git description: 2.1604-21-g729a32b | ||||
| 4 | 1 | 400ns | our $VERSION = '2.1605'; | ||
| 5 | 1 | 0s | our $AUTHORITY = 'cpan:STEVAN'; | ||
| 6 | |||||
| 7 | 2 | 27µs | 1 | 10µs | # spent 10µs within Moose::BEGIN@7 which was called:
# once (10µs+0s) by DBIx::MultiStatementDo::BEGIN@8 at line 7 # spent 10µs making 1 call to Moose::BEGIN@7 |
| 8 | |||||
| 9 | 2 | 12µs | 1 | 2µs | # spent 2µs within Moose::BEGIN@9 which was called:
# once (2µs+0s) by DBIx::MultiStatementDo::BEGIN@8 at line 9 # spent 2µs making 1 call to Moose::BEGIN@9 |
| 10 | 2 | 23µs | 2 | 96µs | # spent 51µs (6+45) within Moose::BEGIN@10 which was called:
# once (6µs+45µs) by DBIx::MultiStatementDo::BEGIN@8 at line 10 # spent 51µs making 1 call to Moose::BEGIN@10
# spent 45µs making 1 call to Exporter::import |
| 11 | 2 | 96µs | 2 | 1.07ms | # spent 1.06ms (987µs+72µs) within Moose::BEGIN@11 which was called:
# once (987µs+72µs) by DBIx::MultiStatementDo::BEGIN@8 at line 11 # spent 1.06ms making 1 call to Moose::BEGIN@11
# spent 11µs making 1 call to Module::Runtime::import |
| 12 | 2 | 61µs | 2 | 8.29ms | # spent 8.26ms (734µs+7.53) within Moose::BEGIN@12 which was called:
# once (734µs+7.53ms) by DBIx::MultiStatementDo::BEGIN@8 at line 12 # spent 8.26ms making 1 call to Moose::BEGIN@12
# spent 27µs making 1 call to Exporter::import |
| 13 | |||||
| 14 | 2 | 77µs | 2 | 1.98ms | # spent 1.98ms (134µs+1.84) within Moose::BEGIN@14 which was called:
# once (134µs+1.84ms) by DBIx::MultiStatementDo::BEGIN@8 at line 14 # spent 1.98ms making 1 call to Moose::BEGIN@14
# spent 4µs making 1 call to Package::DeprecationManager::__ANON__[Package/DeprecationManager.pm:87] |
| 15 | 2 | 76µs | 2 | 76.6ms | # spent 76.6ms (2.21+74.4) within Moose::BEGIN@15 which was called:
# once (2.21ms+74.4ms) by DBIx::MultiStatementDo::BEGIN@8 at line 15 # spent 76.6ms making 1 call to Moose::BEGIN@15
# spent 16µs making 1 call to Moose::Exporter::import |
| 16 | |||||
| 17 | 2 | 29µs | 1 | 3µs | # spent 3µs within Moose::BEGIN@17 which was called:
# once (3µs+0s) by DBIx::MultiStatementDo::BEGIN@8 at line 17 # spent 3µs making 1 call to Moose::BEGIN@17 |
| 18 | |||||
| 19 | # spent 2µs within Moose::BEGIN@19 which was called:
# once (2µs+0s) by DBIx::MultiStatementDo::BEGIN@8 at line 22 | ||||
| 20 | 1 | 2µs | die "Class::MOP version $Moose::VERSION required--this is version $Class::MOP::VERSION" | ||
| 21 | if $Moose::VERSION && $Class::MOP::VERSION ne $Moose::VERSION; | ||||
| 22 | 1 | 11µs | 1 | 2µs | } # spent 2µs making 1 call to Moose::BEGIN@19 |
| 23 | |||||
| 24 | 2 | 90µs | 1 | 12.5ms | # spent 12.5ms (2.23+10.3) within Moose::BEGIN@24 which was called:
# once (2.23ms+10.3ms) by DBIx::MultiStatementDo::BEGIN@8 at line 24 # spent 12.5ms making 1 call to Moose::BEGIN@24 |
| 25 | 2 | 89µs | 1 | 4.72ms | # spent 4.72ms (1.18+3.55) within Moose::BEGIN@25 which was called:
# once (1.18ms+3.55ms) by DBIx::MultiStatementDo::BEGIN@8 at line 25 # spent 4.72ms making 1 call to Moose::BEGIN@25 |
| 26 | 2 | 94µs | 1 | 82.8ms | # spent 82.8ms (459µs+82.4) within Moose::BEGIN@26 which was called:
# once (459µs+82.4ms) by DBIx::MultiStatementDo::BEGIN@8 at line 26 # spent 82.8ms making 1 call to Moose::BEGIN@26 |
| 27 | 2 | 12µs | 1 | 3µs | # spent 3µs within Moose::BEGIN@27 which was called:
# once (3µs+0s) by DBIx::MultiStatementDo::BEGIN@8 at line 27 # spent 3µs making 1 call to Moose::BEGIN@27 |
| 28 | 2 | 81µs | 1 | 947µs | # spent 947µs (164+782) within Moose::BEGIN@28 which was called:
# once (164µs+782µs) by DBIx::MultiStatementDo::BEGIN@8 at line 28 # spent 947µs making 1 call to Moose::BEGIN@28 |
| 29 | |||||
| 30 | 2 | 76µs | 1 | 6.93ms | # spent 6.93ms (598µs+6.33) within Moose::BEGIN@30 which was called:
# once (598µs+6.33ms) by DBIx::MultiStatementDo::BEGIN@8 at line 30 # spent 6.93ms making 1 call to Moose::BEGIN@30 |
| 31 | |||||
| 32 | 2 | 94µs | 1 | 9.78ms | # spent 9.78ms (1.94+7.84) within Moose::BEGIN@32 which was called:
# once (1.94ms+7.84ms) by DBIx::MultiStatementDo::BEGIN@8 at line 32 # spent 9.78ms making 1 call to Moose::BEGIN@32 |
| 33 | 2 | 97µs | 1 | 2.36ms | # spent 2.36ms (666µs+1.69) within Moose::BEGIN@33 which was called:
# once (666µs+1.69ms) by DBIx::MultiStatementDo::BEGIN@8 at line 33 # spent 2.36ms making 1 call to Moose::BEGIN@33 |
| 34 | 2 | 93µs | 1 | 1.57ms | # spent 1.57ms (478µs+1.10) within Moose::BEGIN@34 which was called:
# once (478µs+1.10ms) by DBIx::MultiStatementDo::BEGIN@8 at line 34 # spent 1.57ms making 1 call to Moose::BEGIN@34 |
| 35 | 2 | 77µs | 1 | 1.69ms | # spent 1.69ms (1.02+666µs) within Moose::BEGIN@35 which was called:
# once (1.02ms+666µs) by DBIx::MultiStatementDo::BEGIN@8 at line 35 # spent 1.69ms making 1 call to Moose::BEGIN@35 |
| 36 | 2 | 73µs | 1 | 1.43ms | # spent 1.43ms (601µs+830µs) within Moose::BEGIN@36 which was called:
# once (601µs+830µs) by DBIx::MultiStatementDo::BEGIN@8 at line 36 # spent 1.43ms making 1 call to Moose::BEGIN@36 |
| 37 | 2 | 71µs | 1 | 939µs | # spent 939µs (461+478) within Moose::BEGIN@37 which was called:
# once (461µs+478µs) by DBIx::MultiStatementDo::BEGIN@8 at line 37 # spent 939µs making 1 call to Moose::BEGIN@37 |
| 38 | 2 | 70µs | 1 | 4.78ms | # spent 4.78ms (4.09+689µs) within Moose::BEGIN@38 which was called:
# once (4.09ms+689µs) by DBIx::MultiStatementDo::BEGIN@8 at line 38 # spent 4.78ms making 1 call to Moose::BEGIN@38 |
| 39 | |||||
| 40 | 2 | 24µs | 2 | 1.54ms | # spent 771µs (6+765) within Moose::BEGIN@40 which was called:
# once (6µs+765µs) by DBIx::MultiStatementDo::BEGIN@8 at line 40 # spent 771µs making 1 call to Moose::BEGIN@40
# spent 765µs making 1 call to Moose::Util::TypeConstraints::import |
| 41 | 2 | 19µs | 2 | 142µs | # spent 75µs (9+67) within Moose::BEGIN@41 which was called:
# once (9µs+67µs) by DBIx::MultiStatementDo::BEGIN@8 at line 41 # spent 75µs making 1 call to Moose::BEGIN@41
# spent 67µs making 1 call to Sub::Exporter::__ANON__[Sub/Exporter.pm:337] |
| 42 | |||||
| 43 | 2 | 622µs | 1 | 922µs | # spent 922µs (214+707) within Moose::BEGIN@43 which was called:
# once (214µs+707µs) by DBIx::MultiStatementDo::BEGIN@8 at line 43 # spent 922µs making 1 call to Moose::BEGIN@43 |
| 44 | |||||
| 45 | sub extends { | ||||
| 46 | my $meta = shift; | ||||
| 47 | |||||
| 48 | unless ( @_ ) | ||||
| 49 | { | ||||
| 50 | throw_exception( ExtendsMissingArgs => class_name => $meta->name ); | ||||
| 51 | } | ||||
| 52 | # this checks the metaclass to make sure | ||||
| 53 | # it is correct, sometimes it can get out | ||||
| 54 | # of sync when the classes are being built | ||||
| 55 | $meta->superclasses(@_); | ||||
| 56 | } | ||||
| 57 | |||||
| 58 | sub with { | ||||
| 59 | Moose::Util::apply_all_roles(shift, @_); | ||||
| 60 | } | ||||
| 61 | |||||
| 62 | sub throw_error { | ||||
| 63 | shift; | ||||
| 64 | Class::MOP::Object->throw_error(@_); | ||||
| 65 | } | ||||
| 66 | |||||
| 67 | sub has { | ||||
| 68 | 4 | 800ns | my $meta = shift; | ||
| 69 | 4 | 1µs | my $name = shift; | ||
| 70 | |||||
| 71 | 4 | 11µs | 4 | 39µs | my %context = Moose::Util::_caller_info; # spent 39µs making 4 calls to Moose::Util::_caller_info, avg 10µs/call |
| 72 | 4 | 2µs | $context{context} = 'has declaration'; | ||
| 73 | 4 | 3µs | $context{type} = 'class'; | ||
| 74 | 4 | 8µs | my @options = ( definition_context => \%context, @_ ); | ||
| 75 | 4 | 4µs | my $attrs = ( ref($name) eq 'ARRAY' ) ? $name : [ ($name) ]; | ||
| 76 | 4 | 29µs | 4 | 13.1ms | $meta->add_attribute( $_, @options ) for @$attrs; # spent 13.1ms making 4 calls to Moose::Meta::Class::add_attribute, avg 3.27ms/call |
| 77 | } | ||||
| 78 | |||||
| 79 | sub before { | ||||
| 80 | Moose::Util::add_method_modifier(shift, 'before', \@_); | ||||
| 81 | } | ||||
| 82 | |||||
| 83 | sub after { | ||||
| 84 | Moose::Util::add_method_modifier(shift, 'after', \@_); | ||||
| 85 | } | ||||
| 86 | |||||
| 87 | sub around { | ||||
| 88 | Moose::Util::add_method_modifier(shift, 'around', \@_); | ||||
| 89 | } | ||||
| 90 | |||||
| 91 | our $SUPER_PACKAGE; | ||||
| 92 | our $SUPER_BODY; | ||||
| 93 | our @SUPER_ARGS; | ||||
| 94 | |||||
| 95 | sub super { | ||||
| 96 | if (@_) { | ||||
| 97 | carp 'Arguments passed to super() are ignored'; | ||||
| 98 | } | ||||
| 99 | |||||
| 100 | # This check avoids a recursion loop - see | ||||
| 101 | # t/bugs/super_recursion.t | ||||
| 102 | return if defined $SUPER_PACKAGE && $SUPER_PACKAGE ne caller(); | ||||
| 103 | return unless $SUPER_BODY; $SUPER_BODY->(@SUPER_ARGS); | ||||
| 104 | } | ||||
| 105 | |||||
| 106 | sub override { | ||||
| 107 | my $meta = shift; | ||||
| 108 | my ( $name, $method ) = @_; | ||||
| 109 | $meta->add_override_method_modifier( $name => $method ); | ||||
| 110 | } | ||||
| 111 | |||||
| 112 | sub inner { | ||||
| 113 | my $pkg = caller(); | ||||
| 114 | our ( %INNER_BODY, %INNER_ARGS ); | ||||
| 115 | |||||
| 116 | if ( my $body = $INNER_BODY{$pkg} ) { | ||||
| 117 | my @args = @{ $INNER_ARGS{$pkg} }; | ||||
| 118 | local $INNER_ARGS{$pkg}; | ||||
| 119 | local $INNER_BODY{$pkg}; | ||||
| 120 | return $body->(@args); | ||||
| 121 | } else { | ||||
| 122 | return; | ||||
| 123 | } | ||||
| 124 | } | ||||
| 125 | |||||
| 126 | sub augment { | ||||
| 127 | my $meta = shift; | ||||
| 128 | my ( $name, $method ) = @_; | ||||
| 129 | $meta->add_augment_method_modifier( $name => $method ); | ||||
| 130 | } | ||||
| 131 | |||||
| 132 | 1 | 4µs | 1 | 576µs | Moose::Exporter->setup_import_methods( # spent 576µs making 1 call to Moose::Exporter::setup_import_methods |
| 133 | with_meta => [ | ||||
| 134 | qw( extends with has before after around override augment ) | ||||
| 135 | ], | ||||
| 136 | as_is => [ | ||||
| 137 | qw( super inner ), | ||||
| 138 | 'Carp::confess', | ||||
| 139 | 'Scalar::Util::blessed', | ||||
| 140 | ], | ||||
| 141 | ); | ||||
| 142 | |||||
| 143 | # spent 1.83ms (44µs+1.79) within Moose::init_meta which was called:
# once (44µs+1.79ms) by Moose::import at line 484 of Moose/Exporter.pm | ||||
| 144 | 1 | 300ns | shift; | ||
| 145 | 1 | 2µs | my %args = @_; | ||
| 146 | |||||
| 147 | my $class = $args{for_class} | ||||
| 148 | 1 | 500ns | or throw_exception( InitMetaRequiresClass => params => \%args ); | ||
| 149 | |||||
| 150 | 1 | 500ns | my $base_class = $args{base_class} || 'Moose::Object'; | ||
| 151 | 1 | 300ns | my $metaclass = $args{metaclass} || 'Moose::Meta::Class'; | ||
| 152 | 1 | 2µs | my $meta_name = exists $args{meta_name} ? $args{meta_name} : 'meta'; | ||
| 153 | |||||
| 154 | 1 | 8µs | 1 | 4µs | throw_exception( MetaclassNotLoaded => class_name => $metaclass ) # spent 4µs making 1 call to Class::Load::XS::is_class_loaded |
| 155 | unless is_class_loaded($metaclass); | ||||
| 156 | |||||
| 157 | 1 | 3µs | 1 | 700ns | throw_exception( MetaclassMustBeASubclassOfMooseMetaClass => class_name => $metaclass ) # spent 700ns making 1 call to UNIVERSAL::isa |
| 158 | unless $metaclass->isa('Moose::Meta::Class'); | ||||
| 159 | |||||
| 160 | # make a subtype for each Moose class | ||||
| 161 | 1 | 4µs | 2 | 476µs | class_type($class) # spent 461µs making 1 call to Moose::Util::TypeConstraints::class_type
# spent 15µs making 1 call to Moose::Util::TypeConstraints::find_type_constraint |
| 162 | unless find_type_constraint($class); | ||||
| 163 | |||||
| 164 | 1 | 200ns | my $meta; | ||
| 165 | |||||
| 166 | 1 | 1µs | 1 | 900ns | if ( $meta = Class::MOP::get_metaclass_by_name($class) ) { # spent 900ns making 1 call to Class::MOP::get_metaclass_by_name |
| 167 | unless ( $meta->isa("Moose::Meta::Class") ) { | ||||
| 168 | if ( $meta->isa('Moose::Meta::Role') ) { | ||||
| 169 | throw_exception( MetaclassIsARoleNotASubclassOfGivenMetaclass => role_name => $class, | ||||
| 170 | metaclass => $metaclass, | ||||
| 171 | role => $meta | ||||
| 172 | ); | ||||
| 173 | } else { | ||||
| 174 | throw_exception( MetaclassIsNotASubclassOfGivenMetaclass => class_name => $class, | ||||
| 175 | metaclass => $metaclass, | ||||
| 176 | class => $meta | ||||
| 177 | ); | ||||
| 178 | } | ||||
| 179 | } | ||||
| 180 | } else { | ||||
| 181 | # no metaclass | ||||
| 182 | |||||
| 183 | # now we check whether our ancestors have metaclass, and if so borrow that | ||||
| 184 | 1 | 6µs | 1 | 2µs | my ( undef, @isa ) = @{ mro::get_linear_isa($class) }; # spent 2µs making 1 call to mro::get_linear_isa |
| 185 | |||||
| 186 | 1 | 1µs | foreach my $ancestor ( @isa ) { | ||
| 187 | my $ancestor_meta = Class::MOP::get_metaclass_by_name($ancestor) || next; | ||||
| 188 | |||||
| 189 | my $ancestor_meta_class = $ancestor_meta->_real_ref_name; | ||||
| 190 | |||||
| 191 | # if we have an ancestor metaclass that inherits $metaclass, we use | ||||
| 192 | # that. This is like _fix_metaclass_incompatibility, but we can do it now. | ||||
| 193 | |||||
| 194 | # the case of having an ancestry is not very common, but arises in | ||||
| 195 | # e.g. Reaction | ||||
| 196 | unless ( $metaclass->isa( $ancestor_meta_class ) ) { | ||||
| 197 | if ( $ancestor_meta_class->isa($metaclass) ) { | ||||
| 198 | $metaclass = $ancestor_meta_class; | ||||
| 199 | } | ||||
| 200 | } | ||||
| 201 | } | ||||
| 202 | |||||
| 203 | 1 | 2µs | 1 | 412µs | $meta = $metaclass->initialize($class); # spent 412µs making 1 call to Moose::Meta::Class::initialize |
| 204 | 1 | 3µs | 2 | 13µs | my $filename = module_notional_filename($meta->name); # spent 13µs making 1 call to Module::Runtime::module_notional_filename
# spent 200ns making 1 call to Class::MOP::Package::name |
| 205 | $INC{$filename} = '(set by Moose)' | ||||
| 206 | 1 | 800ns | unless exists $INC{$filename}; | ||
| 207 | } | ||||
| 208 | |||||
| 209 | 1 | 600ns | if (defined $meta_name) { | ||
| 210 | # also check for inherited non moose 'meta' method? | ||||
| 211 | 1 | 1µs | 1 | 17µs | my $existing = $meta->get_method($meta_name); # spent 17µs making 1 call to Class::MOP::Mixin::HasMethods::get_method |
| 212 | 1 | 100ns | if ($existing && !$existing->isa('Class::MOP::Method::Meta')) { | ||
| 213 | Carp::cluck "Moose is overwriting an existing method named " | ||||
| 214 | . "$meta_name in class $class with a method " | ||||
| 215 | . "which returns the class's metaclass. If this is " | ||||
| 216 | . "actually what you want, you should remove the " | ||||
| 217 | . "existing method, otherwise, you should rename or " | ||||
| 218 | . "disable this generated method using the " | ||||
| 219 | . "'-meta_name' option to 'use Moose'."; | ||||
| 220 | } | ||||
| 221 | 1 | 2µs | 1 | 362µs | $meta->_add_meta_method($meta_name); # spent 362µs making 1 call to Class::MOP::Mixin::HasMethods::_add_meta_method |
| 222 | } | ||||
| 223 | |||||
| 224 | # make sure they inherit from Moose::Object | ||||
| 225 | 1 | 2µs | 2 | 502µs | $meta->superclasses($base_class) # spent 502µs making 2 calls to Moose::Meta::Class::superclasses, avg 251µs/call |
| 226 | unless $meta->superclasses(); | ||||
| 227 | |||||
| 228 | 1 | 3µs | return $meta; | ||
| 229 | } | ||||
| 230 | |||||
| 231 | # This may be used in some older MooseX extensions. | ||||
| 232 | sub _get_caller { | ||||
| 233 | goto &Moose::Exporter::_get_caller; | ||||
| 234 | } | ||||
| 235 | |||||
| 236 | ## make 'em all immutable | ||||
| 237 | |||||
| 238 | $_->make_immutable( | ||||
| 239 | inline_constructor => 1, | ||||
| 240 | constructor_name => "_new", | ||||
| 241 | # these are Class::MOP accessors, so they need inlining | ||||
| 242 | inline_accessors => 1 | ||||
| 243 | 22 | 49µs | 42 | 56.9ms | ) for grep { $_->is_mutable } # spent 56.9ms making 21 calls to Class::MOP::Class::make_immutable, avg 2.71ms/call
# spent 4µs making 21 calls to Class::MOP::Class::is_mutable, avg 200ns/call |
| 244 | 21 | 45µs | 21 | 1.07ms | map { $_->meta } # spent 995µs making 9 calls to Class::MOP::Object::meta, avg 111µs/call
# spent 16µs making 1 call to Moose::Meta::TypeCoercion::meta
# spent 10µs making 2 calls to Moose::Meta::Role::Method::Required::meta, avg 5µs/call
# spent 8µs making 1 call to Moose::Meta::Role::meta
# spent 7µs making 1 call to Moose::Meta::TypeCoercion::Union::meta
# spent 6µs making 1 call to Moose::Meta::Role::Application::RoleSummation::meta
# spent 6µs making 1 call to Moose::Meta::Role::Application::ToRole::meta
# spent 5µs making 1 call to Moose::Meta::Role::Composite::meta
# spent 5µs making 1 call to Moose::Meta::Role::Application::ToClass::meta
# spent 5µs making 1 call to Class::MOP::Mixin::meta
# spent 5µs making 1 call to Moose::Meta::Role::Application::meta
# spent 4µs making 1 call to Moose::Meta::Role::Application::ToInstance::meta |
| 245 | qw( | ||||
| 246 | Moose::Meta::Attribute | ||||
| 247 | Moose::Meta::Class | ||||
| 248 | Moose::Meta::Instance | ||||
| 249 | |||||
| 250 | Moose::Meta::TypeCoercion | ||||
| 251 | Moose::Meta::TypeCoercion::Union | ||||
| 252 | |||||
| 253 | Moose::Meta::Method | ||||
| 254 | Moose::Meta::Method::Constructor | ||||
| 255 | Moose::Meta::Method::Destructor | ||||
| 256 | Moose::Meta::Method::Overridden | ||||
| 257 | Moose::Meta::Method::Augmented | ||||
| 258 | |||||
| 259 | Moose::Meta::Role | ||||
| 260 | Moose::Meta::Role::Attribute | ||||
| 261 | Moose::Meta::Role::Method | ||||
| 262 | Moose::Meta::Role::Method::Required | ||||
| 263 | Moose::Meta::Role::Method::Conflicting | ||||
| 264 | |||||
| 265 | Moose::Meta::Role::Composite | ||||
| 266 | |||||
| 267 | Moose::Meta::Role::Application | ||||
| 268 | Moose::Meta::Role::Application::RoleSummation | ||||
| 269 | Moose::Meta::Role::Application::ToClass | ||||
| 270 | Moose::Meta::Role::Application::ToRole | ||||
| 271 | Moose::Meta::Role::Application::ToInstance | ||||
| 272 | ); | ||||
| 273 | |||||
| 274 | $_->make_immutable( | ||||
| 275 | inline_constructor => 0, | ||||
| 276 | constructor_name => undef, | ||||
| 277 | # these are Class::MOP accessors, so they need inlining | ||||
| 278 | inline_accessors => 1 | ||||
| 279 | 4 | 8µs | 6 | 8.23ms | ) for grep { $_->is_mutable } # spent 8.23ms making 3 calls to Class::MOP::Class::make_immutable, avg 2.74ms/call
# spent 600ns making 3 calls to Class::MOP::Class::is_mutable, avg 200ns/call |
| 280 | 3 | 11µs | 3 | 301µs | map { $_->meta } # spent 295µs making 2 calls to Class::MOP::Object::meta, avg 147µs/call
# spent 7µs making 1 call to Class::MOP::Mixin::meta |
| 281 | qw( | ||||
| 282 | Moose::Meta::Method::Accessor | ||||
| 283 | Moose::Meta::Method::Delegation | ||||
| 284 | Moose::Meta::Mixin::AttributeCore | ||||
| 285 | ); | ||||
| 286 | |||||
| 287 | 1 | 11µs | 1; | ||
| 288 | |||||
| 289 | # ABSTRACT: A postmodern object system for Perl 5 | ||||
| 290 | |||||
| 291 | __END__ |