blib/lib/App/cdif/Command/OSAscript.pm untested

filter: Statementstmt 0.0% 0 / 29 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 8 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 41 CC 2 SCAR 10.6
CC
2
Cov
0%
new
6.0
exec
2.0
BEGIN
2.0
CRAP 2.9
1 package App::cdif::Command::OSAscript;
2  
3 use parent "App::cdif::Command";
4  
5 use v5.14;
6 use warnings;
7 use utf8;
8 use Carp;
9 use Data::Dumper;
10  
11 sub new {
12 my($class, %opt) = @_;
13 my @command = qw(osascript);
14 if (my $lang = delete $opt{LANG}) {
15 push @command, "-l", $lang;
16 }
17 my $obj = $class->SUPER::new(%opt);
18 $obj->command("@command");
19 $obj;
20 }
21  
22 sub exec {
23 my $obj = shift;
24 my $script = shift;
25 $obj->setstdin($script)->update->data;
26 }
27  
28 1;