Chart::EPS_graph::Test 0.01d review

by on

SYNOPSIS From the CLI, call as below where '/some/dir/' is any directory you have permission to write to. perl -e "use Chart::E

License: Perl Artistic License
File size: 23K
Developer: Gan Uesli Starling
0 stars award from


From the CLI, call as below where '/some/dir/' is any directory you have permission to write to.

perl -e "use Chart::EPS_graph::Test;

print Chart::EPS_graph::Test->full_test('/some/dir');"

From anywhere else call...

use Chart::EPS_graph::Test;

print Chart::EPS_graph::Test->full_test(/some/dir);

With the parent module ( loaded, call as below. The $foo may be either class or instance (of module Chart::EPS_graph) as it will be ignored. The test module auto-instanciates its own object without need of a new() method. It is just a test, after all.


Then look for both foo.eps and foo.eps.png to be created in /some/dir/.


There is but a single method of interest as detailed in the synopsis above.

A special default is in effect if called without '/some/dir' as an argument. Then output will default to the /home/your_id directory on UNIX or the desktop in Win32 with only the foo.eps (and not the foo.eps.png) being written there. This default behavior exists to allow for the module to be called as a test when first building the module freshly downloaded from CPAN.

In the ordinary, user-diven, case (when /some/dir is supplied as an argument) then this module will allow itself a free hand to search for wherever it is that Ghostscript and/or The GIMP have been installed. It calls the special Perl module File::Find to do this. It must because those programs may be installed in various paths depending upon their version number.

But while being built as a brand new module freshly downloaded from CPAN, taint mode will be in effect. This is a security precaution that disallows many an unsafe condition. Taint mode will disallow that File::Find be free to look about where it likes. Thus, since at time of build we cannot know where Ghostscript and The GIMP might be, and also cannot look for them, then the test must do without them such that only foo.eps and not foo.eps.png may be created during the test.

For use only with the Chart::EPS_graph a full, user-like test thereof.
How this test works is that two files, foo.eps and foo.eps.png will be (over-)written into /some/dir/. The test itself will inspect each of these files for date, size and content. Based upon what it finds it will return a string as its pronouncement on the health of Chart::EPS_graph as a module. That string will contain several lines, all of which should start with "Okay:" and none of which should start with "Oops!".


Chart::EPS_graph::Test 0.01d keywords