line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Geoffrey::Action::Function; |
2
|
|
|
|
|
|
|
|
3
|
6
|
|
|
6
|
|
3068
|
use utf8; |
|
6
|
|
|
|
|
23
|
|
|
6
|
|
|
|
|
33
|
|
4
|
6
|
|
|
6
|
|
239
|
use 5.016; |
|
6
|
|
|
|
|
22
|
|
5
|
6
|
|
|
6
|
|
27
|
use strict; |
|
6
|
|
|
|
|
13
|
|
|
6
|
|
|
|
|
135
|
|
6
|
6
|
|
|
6
|
|
28
|
use warnings; |
|
6
|
|
|
|
|
13
|
|
|
6
|
|
|
|
|
305
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
$Geoffrey::Action::Function::VERSION = '0.000204'; |
9
|
|
|
|
|
|
|
|
10
|
6
|
|
|
6
|
|
44
|
use parent 'Geoffrey::Role::Action'; |
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
32
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub add { |
13
|
4
|
|
|
4
|
1
|
1902
|
my ( $self, $hr_params ) = @_; |
14
|
4
|
|
|
|
|
18
|
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
|
|
|
|
48
|
if ( !$function->add ) { |
20
|
0
|
|
|
|
|
0
|
require Geoffrey::Exception::NotSupportedException; |
21
|
0
|
|
|
|
|
0
|
Geoffrey::Exception::NotSupportedException::throw_action(); |
22
|
|
|
|
|
|
|
} |
23
|
1
|
|
|
|
|
499
|
require Ref::Util; |
24
|
1
|
50
|
|
|
|
1646
|
if ( !Ref::Util::is_hashref($hr_params) ) { |
25
|
1
|
|
|
|
|
450
|
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
|
1519
|
my ( $self, $schema ) = @_; |
44
|
6
|
|
|
|
|
1059
|
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
|
|
|
|
|
5
|
return $function->information( $self->do_arrayref( $function->list($schema) ) ); |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
1; |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
__END__ |