use Async; use WWW::YouTube::Download;my $proc = Async->new(sub { my $client = WWW::YouTube::Download->new; $client->download($video_id, { filename => 'sample.mp4', }); } ) or die;
throws following error:
JSON text must be an object or array (but found number, string, true, false or null, use allow_nonref to allow this) at ../WWW/YouTube/Download.pm line 231.
Note: same error when using core thread: use Thread 'async';
use Async; use WWW::YouTube::Download;
my $proc = Async->new(sub { my $client = WWW::YouTube::Download->new; $client->download($video_id, { filename => 'sample.mp4', }); } ) or die;
throws following error:Note: same error when using core thread:
use Thread 'async';