forked from sergiotarxz/Peertube-dl
20 lines
430 B
Plaintext
20 lines
430 B
Plaintext
|
#!/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);
|