Group
Extension

Matches 2

YAMLScript ( I/IN/INGY/YAMLScript-0.2.7.tar.gz, INGY, 2025; MetaCPAN )
YAMLScript/lib/YAMLScript.pm ( view source; MetaCPAN )
 strict;
use warnings;

package YAMLScript;

use FFI::CheckLib ();
use FFI::Platypus;
use Cpanel::JSON::XS ();

our $VERSION = '0.2.7';

our $libys_version = $VERSION;


#-----------------------------

sub load;
# "load" method wrapper for FFI.
# It calls the libys load_ys_to_json function.
$ffi->attach(
    [load_ys_to_json => 'load'] =>
    ['sint64', 'string'] => 'string' =>
    sub {
        my
 ($xsub, $self, $ys) = @_;
        $self->{error} = undef;

        my $resp = Cpanel::JSON::XS::decode_json(
            $xsub->(${$self->{isolatethread}}, $ys)
        );

        return $resp->{dat
YAMLScript ( I/IN/INGY/YAMLScript-0.2.7.tar.gz, INGY, 2025; MetaCPAN )
YAMLScript/lib/YAMLScript.pod ( view source; MetaCPAN )
YAMLScript;
    use JSON;
    my $ys = YAMLScript->new;
    my $input = do { local $/; open my $fh, '<', 'file.ys'; <$fh> };
    my $data = $ys->load($input);
    print encode_json $data;
File C<file.

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.