| Filename | /home/micha/.plenv/versions/5.38.2/lib/perl5/site_perl/5.38.2/Test2/EventFacet/Meta.pm | 
| Statements | Executed 15 statements in 306µs | 
| Calls | P | F | Exclusive Time | Inclusive Time | Subroutine | 
|---|---|---|---|---|---|
| 1 | 1 | 1 | 448µs | 506µs | Test2::EventFacet::Meta::BEGIN@8 | 
| 1 | 1 | 1 | 9µs | 11µs | Test2::EventFacet::Meta::BEGIN@2 | 
| 1 | 1 | 1 | 6µs | 6µs | Test2::EventFacet::Meta::BEGIN@7 | 
| 1 | 1 | 1 | 6µs | 10µs | Test2::EventFacet::Meta::BEGIN@30 | 
| 1 | 1 | 1 | 5µs | 18µs | Test2::EventFacet::Meta::BEGIN@12 | 
| 1 | 1 | 1 | 3µs | 18µs | Test2::EventFacet::Meta::BEGIN@3 | 
| 0 | 0 | 0 | 0s | 0s | Test2::EventFacet::Meta::AUTOLOAD | 
| 0 | 0 | 0 | 0s | 0s | Test2::EventFacet::Meta::__ANON__[:28] | 
| 0 | 0 | 0 | 0s | 0s | Test2::EventFacet::Meta::can | 
| 0 | 0 | 0 | 0s | 0s | Test2::EventFacet::Meta::set_details | 
| Line | State ments | Time on line | Calls | Time in subs | Code | 
|---|---|---|---|---|---|
| 1 | package Test2::EventFacet::Meta; | ||||
| 2 | 2 | 17µs | 2 | 12µs | # spent 11µs (9+1) within Test2::EventFacet::Meta::BEGIN@2 which was called:
#    once (9µs+1µs) by Test2::Event::BEGIN@20 at line 2 # spent    11µs making 1 call to Test2::EventFacet::Meta::BEGIN@2
# spent     2µs making 1 call to strict::import | 
| 3 | 2 | 33µs | 2 | 34µs | # spent 18µs (3+15) within Test2::EventFacet::Meta::BEGIN@3 which was called:
#    once (3µs+15µs) by Test2::Event::BEGIN@20 at line 3 # spent    18µs making 1 call to Test2::EventFacet::Meta::BEGIN@3
# spent    16µs making 1 call to warnings::import | 
| 4 | |||||
| 5 | 1 | 200ns | our $VERSION = '1.302198'; | ||
| 6 | |||||
| 7 | 2 | 20µs | 1 | 6µs | # spent 6µs within Test2::EventFacet::Meta::BEGIN@7 which was called:
#    once (6µs+0s) by Test2::Event::BEGIN@20 at line 7 # spent     6µs making 1 call to Test2::EventFacet::Meta::BEGIN@7 | 
| 8 | 2 | 85µs | 2 | 525µs | # spent 506µs (448+59) within Test2::EventFacet::Meta::BEGIN@8 which was called:
#    once (448µs+59µs) by Test2::Event::BEGIN@20 at line 8 # spent   506µs making 1 call to Test2::EventFacet::Meta::BEGIN@8
# spent    19µs making 1 call to vars::import | 
| 9 | |||||
| 10 | # replace set_details | ||||
| 11 | { | ||||
| 12 | 2 | 71µs | 2 | 32µs | # spent 18µs (5+13) within Test2::EventFacet::Meta::BEGIN@12 which was called:
#    once (5µs+13µs) by Test2::Event::BEGIN@20 at line 12     # spent    18µs making 1 call to Test2::EventFacet::Meta::BEGIN@12
    # spent    13µs making 1 call to warnings::unimport | 
| 13 | sub set_details { $_[0]->{'set_details'} } | ||||
| 14 | } | ||||
| 15 | |||||
| 16 | 1 | 400ns | sub can { | ||
| 17 | my $self = shift; | ||||
| 18 | my ($name) = @_; | ||||
| 19 | |||||
| 20 | my $existing = $self->SUPER::can($name); | ||||
| 21 | return $existing if $existing; | ||||
| 22 | |||||
| 23 | # Only vivify when called on an instance, do not vivify for a class. There | ||||
| 24 | # are a lot of magic class methods used in things like serialization (or | ||||
| 25 | # the forks.pm module) which cause problems when vivified. | ||||
| 26 | return undef unless ref($self); | ||||
| 27 | |||||
| 28 | my $sub = sub { $_[0]->{$name} }; | ||||
| 29 | { | ||||
| 30 | 2 | 77µs | 2 | 14µs | # spent 10µs (6+4) within Test2::EventFacet::Meta::BEGIN@30 which was called:
#    once (6µs+4µs) by Test2::Event::BEGIN@20 at line 30         # spent    10µs making 1 call to Test2::EventFacet::Meta::BEGIN@30
        # spent     4µs making 1 call to strict::unimport | 
| 31 | *$name = $sub; | ||||
| 32 | } | ||||
| 33 | |||||
| 34 | return $sub; | ||||
| 35 | } | ||||
| 36 | |||||
| 37 | sub AUTOLOAD { | ||||
| 38 | my $name = $AUTOLOAD; | ||||
| 39 | $name =~ s/^.*:://g; | ||||
| 40 | my $sub = $_[0]->can($name); | ||||
| 41 | goto &$sub; | ||||
| 42 | } | ||||
| 43 | |||||
| 44 | 1 | 2µs | 1; | ||
| 45 | |||||
| 46 | __END__ |