The problem could be that wperl doesn't have a console. You could try prefixing the command line with cmd.exe /c ..., or even start /wait /b ....

run ['cmd.exe', '/c', $program, $type], \$dot, ">", binary(), $out; # or run ['start', '/wait', '/b', $program, $type], \$dot, ">", binary(), $ +out;

I don't have GraphViz to test these.

Failing that, it would be relatively easy to replace the call to IPC::Run::run() with a call to piped open supplying the input ($dot) to the command via echo. Something along the lines of (untested):

sub _as_generic { my($self, $type, $dot, $output) = @_; my $program = $self->{LAYOUT}; my $buffer; if ( ref $output || UNIVERSAL::isa(\$output, 'GLOB') ) { # $output is a filehandle or a scalar reference or something. # have to take a reference to a bare filehandle or run will # complain my $out = ref $output ? $output : \$output; my $pid = open my $pipe, '-|', qq[ echo $dot | $program $type +] or die $!; binmode $pipe; print $out <$pipe>; return; } elsif (defined $output) { # if it's defined it must be a filename so we'll write to it. system qq[ echo $dot | $program $type > $output ] ; return; } else { # but otherwise we capture output in a scalar my $pid = open my $pipe, '-|', qq[ echo $dot | $program $type +] or die $!; binmode $pipe; return do{ local $/; <$pipe> }; } }

And that could be rationalised a bit.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

In reply to Re^3: IPC::Run not working with wperl by BrowserUk
in thread IPC::Run not working with wperl by compiler

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.