Alien-Gnuplot

 view release on metacpan or  search on metacpan

README.pod  view on Meta::CPAN

=head1 DESCRIPTION

Alien::Gnuplot verifies existence and sanity of the gnuplot external
application.  It only declares one access method,
C<Alien::Gnuplot::load_gnuplot>, which does the actual work and is
called automatically at load time.  Alien::Gnuplot doesn't have any
actual plotting methods - making use of gnuplot, once it is found and
verified, is up to you or your client module.

Using Alien::Gnuplot checks for existence of the executable, verifies
that it runs properly, and sets several global variables to describe
the properties of the gnuplot it found:

=over 3

=item * C<$Alien::Gnuplot::executable> 

gets the path to the gnuplot executable.

=item * C<$Alien::Gnuplot::version> 

README.pod  view on Meta::CPAN

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

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

=head1 DESCRIPTION

Alien::Gnuplot verifies existence and sanity of the gnuplot external
application.  It only declares one access method,
C<Alien::Gnuplot::load_gnuplot>, which does the actual work and is
called automatically at load time.  Alien::Gnuplot doesn't have any
actual plotting methods - making use of gnuplot, once it is found and
verified, is up to you or your client module.

Using Alien::Gnuplot checks for existence of the executable, verifies
that it runs properly, and sets several global variables to describe
the properties of the gnuplot it found:

=over 3

=item * C<$Alien::Gnuplot::executable> 

gets the path to the gnuplot executable.

=item * C<$Alien::Gnuplot::version> 

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

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

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

Raw output from Gnuplot:
$lines
};
    
    $version = $1;
    $pl = $3;
    $executable = $exec_path;
    
##############################
# Parse out available terminals and put them into the 
# global list and hash.
    @terms = ();
    %terms = ();
    my $reading_terms = 0;
    for my $line(@lines) {
	last if($line =~ m/CcColors/);
	if(!$reading_terms) {
	    if($line =~ m/^Available terminal types\:/) {
		$reading_terms = 1;
	    }
	} else {
	    $line =~ s/^Press return for more\:\s*//;
	    $line =~ m/^\s*(\w+)\s(.*[^\s])\s*$/ || next;
	    push(@terms, $1);
	    $terms{$1} = $2;
	}
    }
    
##############################
# Parse out available colors and put them into that global list and hash.
    @colors = ();
    %colors = ();
    
    for my $line(@lines) {
	last if($line =~ m/FfFinished/);
	next unless( $line =~ m/\s+([\w\-0-9]+)\s+(\#......)/);
	$colors{$1} = $2;
    }
    @colors = sort keys %colors;
}



( run in 0.715 second using v1.01-cache-2.11-cpan-49f99fa48dc )