blib/lib/HTML/FormFu/Role/HasParent.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 10 | 10 | 100.0 |
branch | 2 | 2 | 100.0 |
condition | n/a | ||
subroutine | 3 | 3 | 100.0 |
pod | 0 | 1 | 0.0 |
total | 15 | 16 | 93.7 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package HTML::FormFu::Role::HasParent; | ||||||
2 | |||||||
3 | 401 | 401 | 158821 | use strict; | |||
401 | 585 | ||||||
401 | 14917 | ||||||
4 | our $VERSION = '2.05'; # VERSION | ||||||
5 | |||||||
6 | 401 | 401 | 1505 | use Moose::Role; | |||
401 | 461 | ||||||
401 | 2172 | ||||||
7 | |||||||
8 | sub BUILD { | ||||||
9 | 3724 | 3724 | 0 | 65870 | my ( $self, $args ) = @_; | ||
10 | |||||||
11 | # Moose's new() only handles attributes - not methods | ||||||
12 | |||||||
13 | 3724 | 100 | 8085 | if ( exists $args->{parent} ) { | |||
14 | 1876 | 10432 | $self->parent( delete $args->{parent} ); | ||||
15 | } | ||||||
16 | |||||||
17 | 3724 | 6329 | return; | ||||
18 | } | ||||||
19 | |||||||
20 | 1; |