Sidef/Types/Glob/Backtick.pm untested

filter: Statementstmt 0.0% 0 / 29 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 8 Podpod 0.0% 0 / 4 totaltotal 0.0% 0 / 41 CC 1 SCAR 6.9
CC
1
Cov
0%
new
2.0
get_value
2.0
run
2.0
CRAP 2.0
1 package Sidef::Types::Glob::Backtick;
2  
3 use utf8;
4 use 5.016;
5  
6 use parent qw(
7 Sidef::Object::Object
8 );
9  
10 use overload q{""} => sub {
11 'Backtick(' . ${Sidef::Types::String::String->new(${$_[0]})->dump} . ')';
12 };
13  
14 sub new {
15 my (undef, $backtick) = @_;
16 bless \(my $o = "$backtick"), __PACKAGE__;
17 }
18  
19 *call = \&new;
20  
21 sub get_value {
22 ${$_[0]};
23 }
24  
25 sub run {
26 my ($self) = @_;
27 Sidef::Types::String::String->new(scalar `$$self`);
28 }
29  
30 *execute = \&run;
31 *exec = \&run;
32  
33 sub dump {
34 my ($self) = @_;
35 Sidef::Types::String::String->new("$self");
36 }
37  
38 *to_s = \&dump;
39 *to_str = \&dump;
40  
41 1