Alien-Taco
view release on metacpan or search on metacpan
lib/Alien/Taco.pm view on Meta::CPAN
The methods in this section allow the corresponding Taco actions to be sent.
=over 4
=item call_class_method('class_name', 'function_name',
[args => \@args], [kwargs => \%kwargs])
Invoke a class method call within the Taco server script, returning the
result of that method. The context (void / scalar / list)
is detected and sent as a parameter. Since Perl subroutine arguments
are expanded into a list, the I<arguments> and I<keyword arguments>
must be given separately.
=cut
sub call_class_method {
my $self = shift;
my $class = shift;
my $name = shift;
my %opts = @_;
lib/Alien/Taco.pm view on Meta::CPAN
kwargs => $opts{'kwargs'},
context => (defined wantarray ? (wantarray?'list':'scalar') : 'void'),
});
}
=item call_function('function_name', [args => \@args], [kwargs => \%kwargs])
Invoke a function call within the Taco server script, returning the
result of that function. The context (void / scalar / list)
is detected and sent as a parameter. Since Perl subroutine arguments
are expanded into a list, the I<arguments> and I<keyword arguments>
must be given separately.
=cut
sub call_function {
my $self = shift;
my $name = shift;
my %opts = @_;
return $self->_interact({
( run in 0.708 second using v1.01-cache-2.11-cpan-5b529ec07f3 )