| Filename | /home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/KiokuDB/Thunk.pm |
| Statements | Executed 12 statements in 1.07ms |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 67µs | 23.0ms | KiokuDB::Thunk::BEGIN@4 |
| 1 | 1 | 1 | 45µs | 3.54ms | KiokuDB::Thunk::BEGIN@6 |
| 0 | 0 | 0 | 0s | 0s | KiokuDB::Thunk::_build_value |
| 0 | 0 | 0 | 0s | 0s | KiokuDB::Thunk::vivify |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | #!/usr/bin/perl | ||||
| 2 | |||||
| 3 | package KiokuDB::Thunk; | ||||
| 4 | 3 | 167µs | 2 | 45.9ms | # spent 23.0ms (67µs+22.9) within KiokuDB::Thunk::BEGIN@4 which was called:
# once (67µs+22.9ms) by KiokuDB::TypeMap::Entry::MOP::BEGIN@9 at line 4 # spent 23.0ms making 1 call to KiokuDB::Thunk::BEGIN@4
# spent 22.9ms making 1 call to Moose::Exporter::__ANON__[Moose/Exporter.pm:456] |
| 5 | |||||
| 6 | 3 | 734µs | 2 | 7.04ms | # spent 3.54ms (45µs+3.50) within KiokuDB::Thunk::BEGIN@6 which was called:
# once (45µs+3.50ms) by KiokuDB::TypeMap::Entry::MOP::BEGIN@9 at line 6 # spent 3.54ms making 1 call to KiokuDB::Thunk::BEGIN@6
# spent 3.50ms making 1 call to namespace::clean::import |
| 7 | |||||
| 8 | 1 | 13µs | 1 | 7.64ms | has collapsed => ( # spent 7.64ms making 1 call to Moose::has |
| 9 | isa => "Ref", | ||||
| 10 | is => "ro", | ||||
| 11 | required => 1, | ||||
| 12 | ); | ||||
| 13 | |||||
| 14 | 1 | 12µs | 1 | 7.63ms | has linker => ( # spent 7.63ms making 1 call to Moose::has |
| 15 | isa => "KiokuDB::Linker", | ||||
| 16 | is => "ro", | ||||
| 17 | ); | ||||
| 18 | |||||
| 19 | 1 | 11µs | 1 | 8.22ms | has attr => ( # spent 8.22ms making 1 call to Moose::has |
| 20 | isa => "Class::MOP::Attribute", | ||||
| 21 | is => "ro", | ||||
| 22 | ); | ||||
| 23 | |||||
| 24 | 1 | 12µs | 1 | 14.6ms | has value => ( # spent 14.6ms making 1 call to Moose::has |
| 25 | isa => "Ref", | ||||
| 26 | is => "ro", | ||||
| 27 | lazy_build => 1, | ||||
| 28 | ); | ||||
| 29 | |||||
| 30 | sub _build_value { | ||||
| 31 | my $self = shift; | ||||
| 32 | |||||
| 33 | return $self->linker->expand_object($self->collapsed); | ||||
| 34 | } | ||||
| 35 | |||||
| 36 | sub vivify { | ||||
| 37 | my ( $self, $instance ) = @_; | ||||
| 38 | |||||
| 39 | my $value = $self->value; | ||||
| 40 | |||||
| 41 | my $attr = $self->attr; | ||||
| 42 | |||||
| 43 | $attr->set_raw_value($instance, $value); | ||||
| 44 | |||||
| 45 | $attr->_weaken_value($instance) | ||||
| 46 | if ref $value and $attr->is_weak_ref; | ||||
| 47 | |||||
| 48 | return $value; | ||||
| 49 | } | ||||
| 50 | |||||
| 51 | 1 | 24µs | 2 | 14.8ms | __PACKAGE__->meta->make_immutable; # spent 14.7ms making 1 call to Class::MOP::Class::make_immutable
# spent 138µs making 1 call to KiokuDB::Thunk::meta |
| 52 | |||||
| 53 | 1 | 56µs | __PACKAGE__ | ||
| 54 | |||||
| 55 | 1 | 38µs | 1 | 10.7ms | __END__ # spent 10.7ms making 1 call to B::Hooks::EndOfScope::__ANON__[B/Hooks/EndOfScope.pm:26] |