line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Geoffrey::Action::Function; |
2
|
|
|
|
|
|
|
|
3
|
6
|
|
|
6
|
|
2988
|
use utf8; |
|
6
|
|
|
|
|
13
|
|
|
6
|
|
|
|
|
31
|
|
4
|
6
|
|
|
6
|
|
237
|
use 5.016; |
|
6
|
|
|
|
|
20
|
|
5
|
6
|
|
|
6
|
|
30
|
use strict; |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
139
|
|
6
|
6
|
|
|
6
|
|
31
|
use warnings; |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
305
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
$Geoffrey::Action::Function::VERSION = '0.000205'; |
9
|
|
|
|
|
|
|
|
10
|
6
|
|
|
6
|
|
44
|
use parent 'Geoffrey::Role::Action'; |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
28
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub add { |
13
|
4
|
|
|
4
|
1
|
1801
|
my ( $self, $hr_params ) = @_; |
14
|
4
|
|
|
|
|
16
|
my $function = $self->converter->function; |
15
|
2
|
50
|
|
|
|
9
|
if ( !$function ) { |
16
|
0
|
|
|
|
|
0
|
require Geoffrey::Exception::NotSupportedException; |
17
|
0
|
|
|
|
|
0
|
Geoffrey::Exception::NotSupportedException::throw_converter_type(); |
18
|
|
|
|
|
|
|
} |
19
|
2
|
50
|
|
|
|
51
|
if ( !$function->add ) { |
20
|
0
|
|
|
|
|
0
|
require Geoffrey::Exception::NotSupportedException; |
21
|
0
|
|
|
|
|
0
|
Geoffrey::Exception::NotSupportedException::throw_action(); |
22
|
|
|
|
|
|
|
} |
23
|
1
|
|
|
|
|
515
|
require Ref::Util; |
24
|
1
|
50
|
|
|
|
1649
|
if ( !Ref::Util::is_hashref($hr_params) ) { |
25
|
1
|
|
|
|
|
463
|
require Geoffrey::Exception::General; |
26
|
1
|
|
|
|
|
6
|
Geoffrey::Exception::General::throw_wrong_ref( __PACKAGE__ . '::add', 'hash' ); |
27
|
|
|
|
|
|
|
} |
28
|
0
|
|
|
|
|
0
|
my $args = join q/,/, @{ $hr_params->{args} }; |
|
0
|
|
|
|
|
0
|
|
29
|
0
|
|
|
|
|
0
|
require Geoffrey::Utils; |
30
|
|
|
|
|
|
|
return $self->do( |
31
|
|
|
|
|
|
|
Geoffrey::Utils::replace_spare( |
32
|
|
|
|
|
|
|
$function->add, |
33
|
|
|
|
|
|
|
[ |
34
|
|
|
|
|
|
|
$hr_params->{name}, $args, |
35
|
|
|
|
|
|
|
$hr_params->{result_data_type}, $hr_params->{prosrc}, |
36
|
|
|
|
|
|
|
$hr_params->{language}, $hr_params->{cost}, |
37
|
0
|
|
|
|
|
0
|
] |
38
|
|
|
|
|
|
|
) |
39
|
|
|
|
|
|
|
); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub list { |
43
|
6
|
|
|
6
|
1
|
1490
|
my ( $self, $schema ) = @_; |
44
|
6
|
|
|
|
|
958
|
my $function = $self->converter->function; |
45
|
3
|
50
|
|
|
|
12
|
if ( !$function ) { |
46
|
0
|
|
|
|
|
0
|
require Geoffrey::Exception::NotSupportedException; |
47
|
0
|
|
|
|
|
0
|
Geoffrey::Exception::NotSupportedException::throw_converter_type(); |
48
|
|
|
|
|
|
|
} |
49
|
3
|
50
|
|
|
|
14
|
if ( !$function->list ) { |
50
|
0
|
|
|
|
|
0
|
require Geoffrey::Exception::NotSupportedException; |
51
|
0
|
|
|
|
|
0
|
Geoffrey::Exception::NotSupportedException::throw_action(); |
52
|
|
|
|
|
|
|
} |
53
|
1
|
|
|
|
|
4
|
return $function->information( $self->do_arrayref( $function->list($schema) ) ); |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
1; |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
__END__ |