NAME

Alien::Gnuplot - Find and verify functionality of the gnuplot executable.

SYNOPSIS

package MyGnuplotter;

use strict;

use Alien::Gnuplot;

$gnuplot = $Alien::Gnuplot::executable;

`$gnuplot < /tmp/plotfile`;

1;

DESCRIPTION

Alien::Gnuplot verifies existence and sanity of the gnuplot external application. It doesn't have any methods - actually using gnuplot is up to you. Using Alien::Gnuplot checks for existence of the executable, and sets several global variables:

  • $Alien::Gnuplot::executable gets the path to the executable that was found.

  • $Alien::Gnuplot::version gets the self-reported version number of the executable.

  • $Alien::Gnuplot::pl gets the self-reported patch level.

  • @Alien::Gnuplot::terms gets a list of the names of all supported terminal devices

  • %Alien::Gnuplot::terms gets a key for each supported terminal device; values are the 1-line description from gnuplot.

You can point Alien::Gnuplot to a particular path for gnuplot, by setting the environment variable GNUPLOT_BINARY to the path.

If there is no executable application in your path or in the location pointed to by GNUPLOT_BINARY, then the module throws an exception. You can also verify that it has not completed successfully, by examining $Alien::Gnuplot::version, which is undefined in case of failure and contains the gnuplot version string on success.

INSTALLATION STRATEGY

When you install Alien::Gnuplot, it checks that gnuplot itself is installed as well. If it is not, then Alien::Gnuplot attempts to use one of several common package managers to install gnuplot for you. If it can't find one of those, if dies (and refuses to install), printing 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.

REPOSITORIES

Alien::Gnuplot development is at "http://github.com/drzowie/Alien-Gnuplot".

Gnuplot's main home page is at "http://www.gnuplot.info", and the source code tarball in src is downloaded from there.

AUTHOR

Craig DeForest <craig@deforest.org>

COPYRIGHT AND LICENSE

Copyright (C) 2013 by Craig DeForest

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.