blib/lib/Gapp/Moose/Meta/Attribute/Trait/GappFileChooserButton.pm untested

filter: Statementstmt 0.0% 0 / 20 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 29 CC 1 SCAR 6.9
CC
1
Cov
0%
register_implementation
2.0
BEGIN
2.0
CRAP 2.0
1 package Gapp::Moose::Meta::Attribute::Trait::GappFileChooserButton;
2 {
3 $Gapp::Moose::Meta::Attribute::Trait::GappFileChooserButton::VERSION = '0.60';
4 }
5 use Moose::Role;
6  
7 before '_process_options' => sub {
8 my ( $class, $name, $opts ) = @_;
9 $opts->{gclass} = 'Gapp::FileChooserButton' if ! exists $opts->{class};
10 };
11  
12 has 'action' => (
13 is => 'rw',
14 isa => 'Str',
15 default => 'open',
16 );
17  
18 has 'filters' => (
19 isa => 'ArrayRef',
20 default => sub { [] },
21 traits => [qw( Array )],
22 handles => {
23 add_filter => 'push',
24 filters => 'elements',
25 }
26 );
27  
28  
29  
30 before '_build_gobject' => sub {
31 my $self = shift;
32 $self->set_args( [ $self->properties->{title} ? $self->properties->{title} : '' ,
33 $self->parent ? $self->parent->gobject : undef,
34 $self->action ] );
35 };
36
37  
38 package Moose::Meta::Attribute::Custom::Trait::GappFileChooserButton;
39 {
40 $Moose::Meta::Attribute::Custom::Trait::GappFileChooserButton::VERSION = '0.60';
41 }
42 sub register_implementation { 'Gapp::Moose::Meta::Attribute::Trait::GappFileChooserButton' };
43 1;