The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

RapidApp::JSON::ScriptWithData

SYNOPSIS

use RapidApp::JSON::ScriptWithData;
use RapidApp::JSON::MixedEncoder 'encode_json';

$swd= RapidApp::JSON::ScriptWithData->new(
  'function () {',
    'blah(12345);',
    'var b= foo(bar(', $self->getSomething, '));',
    'var a=', { x=>1, y=>2, z=>3 }, ';',
    'return baz(a, b);',
  '}'
);

return encode_json($swd);