JSPL::Runtime - Runs contexts
use JSPL; my $rt = JSPL::Runtime->new(); my $ctx = $rt->create_context(); # BTW, if you don't need the runtime, it is always easier to just: use JSPL; my $ctx = JSPL->stock_context();
The main use of a runtime in JSPL is to create contexts, i.e. JSPL::Context instances.
- new ( [ $maxbytes] )
Creates a new
JSPL::Runtimeobject and returns it.
If the $maxbytes option is given, it's taken to be the number of bytes that can be allocated before garbage collection is run. If omitted defaults to 4MB.
The default max number of bytes that can be allocated before garbage collection is run. Used when you don't pass a $maxbytes parameter to "new".
Useful to set the default before you call "stock_context" in JSPL.