| Filename | /Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Role/Tiny/With.pm |
| Statements | Executed 16 statements in 204µs |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 34µs | 36µs | Role::Tiny::With::BEGIN@3 |
| 2 | 2 | 2 | 14µs | 5.22ms | Role::Tiny::With::with |
| 1 | 1 | 1 | 6µs | 12µs | Role::Tiny::With::BEGIN@11 |
| 1 | 1 | 1 | 6µs | 29µs | Role::Tiny::With::BEGIN@4 |
| 1 | 1 | 1 | 4µs | 4µs | Role::Tiny::With::BEGIN@9 |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package Role::Tiny::With; | ||||
| 2 | |||||
| 3 | 2 | 28µs | 2 | 38µs | # spent 36µs (34+2) within Role::Tiny::With::BEGIN@3 which was called:
# once (34µs+2µs) by Data::Perl::Collection::Array::MooseLike::BEGIN@7 at line 3 # spent 36µs making 1 call to Role::Tiny::With::BEGIN@3
# spent 2µs making 1 call to strict::import |
| 4 | 2 | 44µs | 2 | 52µs | # spent 29µs (6+23) within Role::Tiny::With::BEGIN@4 which was called:
# once (6µs+23µs) by Data::Perl::Collection::Array::MooseLike::BEGIN@7 at line 4 # spent 29µs making 1 call to Role::Tiny::With::BEGIN@4
# spent 23µs making 1 call to warnings::import |
| 5 | |||||
| 6 | 1 | 1µs | our $VERSION = '2.002004'; | ||
| 7 | 1 | 1µs | $VERSION =~ tr/_//d; | ||
| 8 | |||||
| 9 | 2 | 16µs | 1 | 4µs | # spent 4µs within Role::Tiny::With::BEGIN@9 which was called:
# once (4µs+0s) by Data::Perl::Collection::Array::MooseLike::BEGIN@7 at line 9 # spent 4µs making 1 call to Role::Tiny::With::BEGIN@9 |
| 10 | |||||
| 11 | 2 | 95µs | 2 | 18µs | # spent 12µs (6+6) within Role::Tiny::With::BEGIN@11 which was called:
# once (6µs+6µs) by Data::Perl::Collection::Array::MooseLike::BEGIN@7 at line 11 # spent 12µs making 1 call to Role::Tiny::With::BEGIN@11
# spent 6µs making 1 call to Exporter::import |
| 12 | 1 | 1µs | our @EXPORT = qw( with ); | ||
| 13 | |||||
| 14 | # spent 5.22ms (14µs+5.21) within Role::Tiny::With::with which was called 2 times, avg 2.61ms/call:
# once (7µs+3.47ms) by Module::Runtime::require_module at line 10 of Data/Perl/Collection/Array/MooseLike.pm
# once (7µs+1.74ms) by Module::Runtime::require_module at line 10 of Data/Perl/Collection/Hash/MooseLike.pm | ||||
| 15 | 2 | 1µs | my $target = caller; | ||
| 16 | 2 | 14µs | 2 | 5.21ms | Role::Tiny->apply_roles_to_package($target, @_) # spent 5.21ms making 2 calls to Role::Tiny::apply_roles_to_package, avg 2.60ms/call |
| 17 | } | ||||
| 18 | |||||
| 19 | 1 | 3µs | 1; | ||
| 20 | |||||
| 21 | =head1 NAME | ||||
| 22 | |||||
| 23 | Role::Tiny::With - Neat interface for consumers of Role::Tiny roles | ||||
| 24 | |||||
| 25 | =head1 SYNOPSIS | ||||
| 26 | |||||
| 27 | package Some::Class; | ||||
| 28 | |||||
| 29 | use Role::Tiny::With; | ||||
| 30 | |||||
| 31 | with 'Some::Role'; | ||||
| 32 | |||||
| 33 | # The role is now mixed in | ||||
| 34 | |||||
| 35 | =head1 DESCRIPTION | ||||
| 36 | |||||
| 37 | C<Role::Tiny> is a minimalist role composition tool. C<Role::Tiny::With> | ||||
| 38 | provides a C<with> function to compose such roles. | ||||
| 39 | |||||
| 40 | =head1 AUTHORS | ||||
| 41 | |||||
| 42 | See L<Role::Tiny> for authors. | ||||
| 43 | |||||
| 44 | =head1 COPYRIGHT AND LICENSE | ||||
| 45 | |||||
| 46 | See L<Role::Tiny> for the copyright and license. | ||||
| 47 | |||||
| 48 | =cut | ||||
| 49 | |||||
| 50 |