Alien-Gnuplot

 view release on metacpan or  search on metacpan

README.pod  view on Meta::CPAN

=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
can be found at L<https://github.com/PDLPorters/PDL-Graphics-Gnuplot>.
PDL is at L<https://pdl.perl.org/>.

=head1 AUTHOR

Craig DeForest <craig@deforest.org>

(with special thanks to Chris Marshall, Juergen Mueck, and
Sisyphus for testing and debugging on the Microsoft platform)

=head1 COPYRIGHT AND LICENSE

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

=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
can be found at L<https://github.com/PDLPorters/PDL-Graphics-Gnuplot>.
PDL is at L<https://pdl.perl.org/>.

=head1 AUTHOR

Craig DeForest <craig@deforest.org>

(with special thanks to Chris Marshall, Juergen Mueck, and
Sisyphus for testing and debugging on the Microsoft platform)

=head1 COPYRIGHT AND LICENSE

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

    #
    #   use Alien::Gnuplot 4.4;
    #
    # to check Gnuplot version.
    $module->load_gnuplot unless $version; # already have version
    unless($req_v <= $version) {
	die qq{

Alien::Gnuplot: Found gnuplot version $version, but you requested $req_v. 
You should upgrade gnuplot, either by reinstalling Alien::Gnuplot or 
getting it yourself from L<https://gnuplot.sourceforge.net/>.

};
    }
}

sub exe {
##############################
# Search the path for the executable
#
    my ($class) = @_;

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


sub check_gnuplot {
    my $exec_path = pop @_;

    unless(-x $exec_path) { 
	die q{
Alien::Gnuplot: no executable gnuplot found!  If you have gnuplot,
you can put its exact location in your GNUPLOT_BINARY environment 
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);



( run in 0.639 second using v1.01-cache-2.11-cpan-df04353d9ac )