blib/lib/Gapp/MenuItem.pm untested

filter: Statementstmt 0.0% 0 / 26 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 0.0% 0 / 3 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 39 CC 3 SCAR 20.8
CC
3
Cov
0%
BUILDARGS
12.0
BEGIN
2.0
BEGIN
2.0
CRAP 8.0
1 package Gapp::MenuItem;
2 {
3 $Gapp::MenuItem::VERSION = '0.60';
4 }
5  
6 use Moose;
7 use MooseX::SemiAffordanceAccessor;
8  
9 extends 'Gapp::Bin';
10 with 'Gapp::Meta::Widget::Native::Role::HasAction';
11 with 'Gapp::Meta::Widget::Native::Role::HasLabel';
12 with 'Gapp::Meta::Widget::Native::Role::HasMenu';
13 with 'Gapp::Meta::Widget::Native::Role::HasMnemonic';
14  
15 has '+gclass' => (
16 default => 'Gtk2::MenuItem',
17 );
18  
19 has '+constructor' => (
20 default => 'new_with_label',
21 );
22  
23 has '+args' => (
24 default => sub { [ '' ] },
25 );
26  
27 has 'visible_func' => (
28 is => 'rw',
29 isa => 'Maybe[CodeRef]',
30 );
31  
32  
33 sub BUILDARGS {
34 my $class = shift;
35 my %args = @_ == 1 && is_HashRef( $_[0] ) ? %{$_[0]} : @_;
36
37 for my $att ( qw(accel_path) ) {
38 $args{properties}{$att} = delete $args{$att} if exists $args{$att};
39 }
40
41 __PACKAGE__->SUPER::BUILDARGS( %args );
42 }
43  
44  
45  
46 1;
47  
48  
49 __END__