| 1 | package Dallycot::AST::LibraryFunction; | ||
| 2 | 29 | our $AUTHORITY = 'cpan:JSMITH'; | |
| 3 | |||
| 4 | # ABSTRACT: Call function in an extension library | ||
| 5 | |||
| 6 | 29 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 29 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | 29 | ▶ | use utf8; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | 29 | ▶ | use parent 'Dallycot::AST'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | |||
| 12 | sub to_string { | ||
| 13 | 0 | ▶ | my ($self) = @_; |
|
Subroutine
to_string: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 14 | |||
| 15 | 0 | my ( $parsing_library, $fname, $bindings, $options ) = @$self; | |
| 16 | |||
| 17 | return join( ",", | ||
| 18 | "call($parsing_library#$fname", | ||
| 19 | 0 | ( map { $_->to_string } @$bindings ), | |
| 20 | 0 | ( map { $_ . "->" . $options->{$_}->to_string } keys %$options ) ) | |
| 21 | . ")"; | ||
| 22 | } | ||
| 23 | |||
| 24 | sub execute { | ||
| 25 | 0 | ▶ | my ( $self, $engine ) = @_; |
|
Subroutine
execute: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 26 | |||
| 27 | 0 | my ( $parsing_library, $fname, $bindings, $options ) = @$self; | |
| 28 | |||
| 29 | 0 | return $parsing_library->instance->call_function( $fname, $engine, $options, @{$bindings} ); | |
| 30 | } | ||
| 31 | |||
| 32 | sub child_nodes { | ||
| 33 | 0 | ▶ | my ($self) = @_; |
|
Subroutine
child_nodes: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 34 | |||
| 35 | 0 | return ( @{ $self->[2] }, values %{ $self->[3] } ); | |
| 36 | } | ||
| 37 | |||
| 38 | 29 | 1; | |