Attributes/Trait/Role/Composite.pm

filter: Statementstmt 100% 15 / 15 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod n/a totaltotal 100% 20 / 20 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Attributes/Trait/Method/Accessor/Native.pm ↑ Summary
1 #
2 # This file is part of MooseX-TrackDirty-Attributes
3 #
4 # This software is Copyright (c) 2011 by Chris Weyl.
5 #
6 # This is free software, licensed under:
7 #
8 # The GNU Lesser General Public License, Version 2.1, February 1999
9 #
10 package MooseX::TrackDirty::Attributes::Trait::Role::Composite;
11 4 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
12 4 $MooseX::TrackDirty::Attributes::Trait::Role::Composite::AUTHORITY = 'cpan:RSRCHBOY';
13 }
14 4 $MooseX::TrackDirty::Attributes::Trait::Role::Composite::VERSION = '2.003';
15 # ABSTRACT: Apply our application::to* traits to any composition of our role and any other
16  
17 4 ▶use Moose::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 4 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
19  
20 4 ▶use MooseX::TrackDirty::Attributes::Util ':all';
Subroutine BEGIN: called CC=1 SCAR=0.0
21  
22 # debugging...
23 #use Smart::Comments;
24  
25  
26 3 ▶around apply_params => sub {
Subroutine __ANON__: called CC=1 SCAR=0.0
27 3 my ($orig, $self) = (shift, shift);
28  
29 3 return Moose::Util::MetaRole::apply_metaroles(
30 for => $self->$orig(@_),
31 role_metaroles => {
32 role => [ trait_for 'Role' ],
33 application_to_class => [ ToClass ],
34 application_to_role => [ ToRole ],
35 application_to_instance => [ ToInstance ],
36 },
37 );
38 4 };
39  
40  
41 4 !!42;
42  
43 __END__
« Attributes/Trait/Method/Accessor/Native.pm ↑ Summary