Alien-Gnuplot
view release on metacpan or search on metacpan
This is useful for decoding colors, or for checking whether a particular color
name is recognized. All the color names are lowercase alphanumeric.
=back
You can point Alien::Gnuplot to a particular path for gnuplot, by
setting the environment variable GNUPLOT_BINARY to the path. Otherwise
your path will be searched (using File::Spec) for the executable file.
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.
If you think the global state of the gnuplot executable may have
changed, you can either reload the module or explicitly call
C<Alien::Gnuplot::load_gnuplot()> to force a fresh inspection of
the executable.
=head1 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.
=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
lib/Alien/Gnuplot.pm view on Meta::CPAN
This is useful for decoding colors, or for checking whether a particular color
name is recognized. All the color names are lowercase alphanumeric.
=back
You can point Alien::Gnuplot to a particular path for gnuplot, by
setting the environment variable GNUPLOT_BINARY to the path. Otherwise
your path will be searched (using File::Spec) for the executable file.
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.
If you think the global state of the gnuplot executable may have
changed, you can either reload the module or explicitly call
C<Alien::Gnuplot::load_gnuplot()> to force a fresh inspection of
the executable.
=head1 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.
=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
t/02-version.t view on Meta::CPAN
#===============================================================================
use strict;
use warnings;
use Alien::Gnuplot;
use Test::More tests => 2;
use Test::Exception;
lives_ok { Alien::Gnuplot->VERSION (0.1) } 'Installed version > 0,1';
throws_ok { Alien::Gnuplot->VERSION (99) } qr/You should upgrade gnuplot/,
'Installed version < 99';
use strict;
use warnings;
use Alien::Gnuplot;
use Test::More tests => 1;
use Test::Exception;
# Set the path to something non-existent
$ENV{GNUPLOT_BINARY} = '/this/is/not/a/real/path';
throws_ok { Alien::Gnuplot->load_gnuplot } qr/no executable gnuplot found!/,
'Duff path fatality';
( run in 0.444 second using v1.01-cache-2.11-cpan-496ff517765 )