| Filename | /home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Set/Object/Weak.pm |
| Statements | Executed 14 statements in 912µs |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 73µs | 336µs | Set::Object::Weak::BEGIN@28 |
| 1 | 1 | 1 | 59µs | 381µs | Set::Object::Weak::BEGIN@32 |
| 1 | 1 | 1 | 36µs | 236µs | Set::Object::Weak::BEGIN@31 |
| 1 | 1 | 1 | 34µs | 114µs | Set::Object::Weak::BEGIN@30 |
| 0 | 0 | 0 | 0s | 0s | Set::Object::Weak::new |
| 0 | 0 | 0 | 0s | 0s | Set::Object::Weak::set |
| 0 | 0 | 0 | 0s | 0s | Set::Object::Weak::weak_set |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | |||||
| 2 | =head1 NAME | ||||
| 3 | |||||
| - - | |||||
| 26 | package Set::Object::Weak; | ||||
| 27 | |||||
| 28 | 3 | 117µs | 2 | 598µs | # spent 336µs (73+262) within Set::Object::Weak::BEGIN@28 which was called:
# once (73µs+262µs) by KiokuDB::Collapser::Buffer::BEGIN@5 at line 28 # spent 336µs making 1 call to Set::Object::Weak::BEGIN@28
# spent 262µs making 1 call to base::import |
| 29 | |||||
| 30 | 3 | 95µs | 2 | 195µs | # spent 114µs (34+80) within Set::Object::Weak::BEGIN@30 which was called:
# once (34µs+80µs) by KiokuDB::Collapser::Buffer::BEGIN@5 at line 30 # spent 114µs making 1 call to Set::Object::Weak::BEGIN@30
# spent 80µs making 1 call to base::import |
| 31 | 3 | 104µs | 2 | 437µs | # spent 236µs (36+200) within Set::Object::Weak::BEGIN@31 which was called:
# once (36µs+200µs) by KiokuDB::Collapser::Buffer::BEGIN@5 at line 31 # spent 236µs making 1 call to Set::Object::Weak::BEGIN@31
# spent 200µs making 1 call to vars::import |
| 32 | 3 | 576µs | 2 | 703µs | # spent 381µs (59+322) within Set::Object::Weak::BEGIN@32 which was called:
# once (59µs+322µs) by KiokuDB::Collapser::Buffer::BEGIN@5 at line 32 # spent 381µs making 1 call to Set::Object::Weak::BEGIN@32
# spent 322µs making 1 call to Exporter::import |
| 33 | |||||
| 34 | 1 | 7µs | our @EXPORT_OK = qw(weak_set set); | ||
| 35 | |||||
| 36 | =head1 CONSTRUCTORS | ||||
| 37 | |||||
| - - | |||||
| 47 | sub new { | ||||
| 48 | my $class = shift; | ||||
| 49 | my $self = $class->SUPER::new(); | ||||
| 50 | $self->weaken; | ||||
| 51 | $self->insert(@_); | ||||
| 52 | $self; | ||||
| 53 | } | ||||
| 54 | |||||
| 55 | =item weak_set( ... ) | ||||
| 56 | |||||
| - - | |||||
| 63 | sub weak_set { | ||||
| 64 | __PACKAGE__->new(@_); | ||||
| 65 | } | ||||
| 66 | |||||
| 67 | =item set( ... ) | ||||
| 68 | |||||
| - - | |||||
| 82 | sub set { | ||||
| 83 | my $class = __PACKAGE__; | ||||
| 84 | if (blessed $_[0] and $_[0]->isa("Set::Object")) { | ||||
| 85 | $class = (shift)->strong_pkg; | ||||
| 86 | } | ||||
| 87 | $class->new(@_); | ||||
| 88 | } | ||||
| 89 | |||||
| 90 | 1 | 12µs | 1; | ||
| 91 | |||||
| 92 | __END__ |