Zuzu::Module::Perl(3)

NAME
Zuzu::Module::Perl - perl builtin bridge for ZuzuScript.

DESCRIPTION
Implements the "perl" builtin module.

Exports:

•   "Perl" class with static methods "version" and "eval"

•   "PerlResult" class wrapping evaluated Perl values

"Perl.eval" runs Perl source code in scalar context and always returns "PerlResult".

"PerlResult" provides:

•   "isSafe"

    True when the wrapped value contains only undef, scalar, array, and hash data recursively.

•   "value"

    Converts the wrapped value to a native Zuzu value. Dies if unsafe.

•   "toJSON"

    Attempts JSON serialization of the wrapped Perl value.

•   "eval"

    Evaluates further Perl code with the current result available as $_ in scalar context.

COPYRIGHT AND LICENCE
Zuzu::Module::Perl is copyright Toby Inkster.

It is free software; you may redistribute it and/or modify it under the terms of either the Artistic License 1.0 or the GNU General Public License version 2.