Alien-Gnuplot

 view release on metacpan or  search on metacpan

README.pod  view on Meta::CPAN

a friendly message about how to get gnuplot before throwing an error.

In principle, gnuplot could be automagically downloaded and built, 
but it is distributed via Sourceforge -- which obfuscates interior
links, making such tools surprisingly difficult to write.

=head1 CROSS-PLATFORM BEHAVIOR

On POSIX systems, including Linux and MacOS, Alien::Gnuplot uses
fork/exec to invoke the gnuplot executable and asynchronously monitor
it for hangs.  Microsoft Windows process control is more difficult, so
if $^O contains "MSWin32", a simpler system call is used, that is
riskier -- it involves waiting for the unknown executable to complete.

=head1 REPOSITORIES

Gnuplot's main home page is at L<https://gnuplot.sourceforge.net/>.

Alien::Gnuplot development is at L<https://github.com/drzowie/Alien-Gnuplot>.

A major client module for Alien::Gnuplot is PDL::Graphics::Gnuplot, which

lib/Alien/Gnuplot.pm  view on Meta::CPAN

a friendly message about how to get gnuplot before throwing an error.

In principle, gnuplot could be automagically downloaded and built, 
but it is distributed via Sourceforge -- which obfuscates interior
links, making such tools surprisingly difficult to write.

=head1 CROSS-PLATFORM BEHAVIOR

On POSIX systems, including Linux and MacOS, Alien::Gnuplot uses
fork/exec to invoke the gnuplot executable and asynchronously monitor
it for hangs.  Microsoft Windows process control is more difficult, so
if $^O contains "MSWin32", a simpler system call is used, that is
riskier -- it involves waiting for the unknown executable to complete.

=head1 REPOSITORIES

Gnuplot's main home page is at L<https://gnuplot.sourceforge.net/>.

Alien::Gnuplot development is at L<https://github.com/drzowie/Alien-Gnuplot>.

A major client module for Alien::Gnuplot is PDL::Graphics::Gnuplot, which

lib/Alien/Gnuplot.pm  view on Meta::CPAN

variable or make sure your PATH contains it.  If you do not have
gnuplot, you can reinstall Alien::Gnuplot (and its installation 
script will try to install gnuplot) or get it yourself from L<https://gnuplot.sourceforge.net/>.
};
    }
    
##############################
# Execute the executable to make sure it's really gnuplot, and parse
# out its reported version.  This is complicated by gnuplot's shenanigans
# with STDOUT and STDERR, so we fork and redirect everything to a file.
# The parent process gives the daughter 2 seconds to report progress, then
# kills it dead.
    my($pid);
    my ($undef, $file) = tempfile();

    # Create command file
    open FOO, ">${file}_gzinta";
    print FOO "show version\nset terminal\n\n\n\n\n\n\n\n\n\nprint \"CcColors\"\nshow colornames\n\n\n\n\n\n\n\nprint \"FfFinished\"\nexit\n";
    close FOO;

    if($^O =~ /MSWin32/i) {



( run in 0.317 second using v1.01-cache-2.11-cpan-8d75d55dd25 )