Peertube-dl/bin/js-pruebas

20 lines
430 B
Plaintext
Raw Normal View History

#!/usr/bin/env perl
use strict;
use warnings;
use feature 'say';
use Peertube::DL::Javascript;
my $a = Peertube::DL::Javascript::_duk_create_heap_default();
eval { Peertube::DL::Javascript::_duk_push_lstring( $a, "print(\"hola mundo\\n\");" ); };
if ($@) {
warn $@;
$@ = "";
}
if ( defined $a ) {
printf( "0x%0x\n", $a );
}
Peertube::DL::Javascript::_duk_peval($a);
Peertube::DL::Javascript::_duk_destroy_heap($a);