blib/lib/Gapp/Meta/Widget/Native/Role/FormElement.pm untested

filter: Statementstmt 0.0% 0 / 14 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 3 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 22 CC 3 SCAR 20.8
CC
3
Cov
0%
form
12.0
BEGIN
2.0
BEGIN
2.0
CRAP 8.0
1 package Gapp::Meta::Widget::Native::Role::FormElement;
2 {
3 $Gapp::Meta::Widget::Native::Role::FormElement::VERSION = '0.60';
4 }
5  
6 use Moose::Role;
7 use MooseX::SemiAffordanceAccessor;
8  
9  
10 #has 'form' => (
11 # is => 'ro',
12 # lazy_build => 1,
13 # weak_ref => 1,
14 # predicate => 'has_form',
15 # clearer => 'clear_form',
16 #);
17  
18 sub form {
19 my ( $self ) = @_;
20
21 my $node = $self;
22 while ( $node ) {
23 return $node if $node->does('Gapp::Meta::Widget::Native::Trait::Form');
24 return if ! $node->parent;
25 $node = $node->parent;
26 }
27 }
28  
29 1;