blib/lib/Gapp/Action/Undefined.pm untested

filter: Statementstmt 0.0% 0 / 29 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 7 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 38 CC 1 SCAR 6.9
CC
1
Cov
0%
perform
2.0
create_gtk_action
2.0
BEGIN
2.0
CRAP 2.0
1 package Gapp::Action::Undefined;
2 {
3 $Gapp::Action::Undefined::VERSION = '0.60';
4 }
5  
6 use Moose;
7 use MooseX::SemiAffordanceAccessor;
8 use MooseX::StrictConstructor;
9  
10 use Carp;
11 extends 'Gapp::Action';
12  
13  
14 sub perform {
15 my ( $self, @args ) = @_;
16 carp 'you are calling "perform" on an undefind action (' . $self->name . ')';
17 }
18  
19 sub create_gtk_action {
20 my ( $self, @args ) = @_;
21 my %opts = (
22 name => $self->name,
23 );
24
25
26 my $gtk_action = Gtk2::Action->new( %opts );
27 $gtk_action->signal_connect( activate => sub {
28 my ( $gtkw, @gtkargs ) = @_;
29 $self->perform( $self, \@args, $gtkw, \@gtkargs );
30 });
31 return $gtk_action;
32 }
33  
34 no Moose;
35 __PACKAGE__->meta->make_immutable;
36  
37 1;
38  
39 __END__