Alien-Plotly-Kaleido

 view release on metacpan or  search on metacpan

lib/Alien/Plotly/Kaleido.pm  view on Meta::CPAN

                'plotly.js/plotly.min.js' );
              if ( -r $plotlyjs ) {
                push @cmd, "--plotlyjs=$plotlyjs";
            }
        };
        my $h;
        my $data;
        eval {
            my ( $in, $out, $err );
            $h = IPC::Run::start( \@cmd, \$in, \$out, \$err,
                my $t = IPC::Run::timer(30) );
            while ( not $data and not $t->is_expired ) {
                $h->pump;
                $data = $decode_json_safe->($out);
            }
            $h->finish;
        };
        if ($@) {
            warn $@;
            $h->kill_kill;
        }

util/MyInstallUtil.pm  view on Meta::CPAN

                'plotly.js/plotly.min.js' );
              if ( -r $plotlyjs ) {
                push @cmd, "--plotlyjs=$plotlyjs";
            }
        };
        my $h;
        my $data;
        eval {
            my ( $in, $out, $err );
            $h = IPC::Run::start( \@cmd, \$in, \$out, \$err,
                my $t = IPC::Run::timer(30) );
            while ( not $data and not $t->is_expired ) {
                $h->pump;
                $data = $decode_json_safe->($out);
            }
            $h->finish;
        };
        if ($@) {
            warn $@;
            $h->kill_kill;
        }



( run in 1.028 second using v1.01-cache-2.11-cpan-49f99fa48dc )