| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package MooX::Role::Parameterized::With; | 
| 2 |  |  |  |  |  |  | { | 
| 3 |  |  |  |  |  |  | $MooX::Role::Parameterized::With::VERSION = '0.081'; | 
| 4 |  |  |  |  |  |  | } | 
| 5 | 3 |  |  | 3 |  | 61590 | use strict; | 
|  | 3 |  |  |  |  | 7 |  | 
|  | 3 |  |  |  |  | 73 |  | 
| 6 | 3 |  |  | 3 |  | 15 | use warnings; | 
|  | 3 |  |  |  |  | 6 |  | 
|  | 3 |  |  |  |  | 74 |  | 
| 7 |  |  |  |  |  |  |  | 
| 8 |  |  |  |  |  |  | # ABSTRACT: MooX::Role::Parameterized:With - dsl to apply roles with composition parameters | 
| 9 |  |  |  |  |  |  |  | 
| 10 | 3 |  |  | 3 |  | 14 | use Exporter;    # qw(import); | 
|  | 3 |  |  |  |  | 5 |  | 
|  | 3 |  |  |  |  | 126 |  | 
| 11 | 3 |  |  | 3 |  | 15 | use Module::Runtime qw(use_module); | 
|  | 3 |  |  |  |  | 6 |  | 
|  | 3 |  |  |  |  | 21 |  | 
| 12 | 3 |  |  | 3 |  | 2497 | use List::MoreUtils qw(natatime); | 
|  | 3 |  |  |  |  | 37063 |  | 
|  | 3 |  |  |  |  | 21 |  | 
| 13 |  |  |  |  |  |  |  | 
| 14 |  |  |  |  |  |  | sub import { | 
| 15 | 3 |  |  | 3 |  | 36 | my $package = shift; | 
| 16 | 3 |  |  |  |  | 24 | my $target  = caller; | 
| 17 |  |  |  |  |  |  |  | 
| 18 | 3 |  |  |  |  | 47 | my $it = natatime( 2, @_ ); | 
| 19 |  |  |  |  |  |  |  | 
| 20 | 3 |  |  |  |  | 40 | while ( my ( $role, $params ) = $it->() ) { | 
| 21 | 3 |  |  |  |  | 15 | use_module($role)->apply( $params, target => $target ); | 
| 22 |  |  |  |  |  |  | } | 
| 23 |  |  |  |  |  |  | } | 
| 24 |  |  |  |  |  |  |  | 
| 25 |  |  |  |  |  |  | 1; | 
| 26 |  |  |  |  |  |  |  | 
| 27 |  |  |  |  |  |  | __END__ |