The script referenced on the url below, used to work with previous perl-GD... versions that came with earlier suse versions. http://www.linuxgazette.com/issue83/misc/padala/simple.pl.txt (if have repeated the script below for completeness, it's not big really). It seems that the current version of perl-GD is treating the perl module GD::Graph::bars differently. It now uses templates or so? However, I don't the script running on suse9. Is there a perl guru out there that knows how to change the script so it runs on suse9? perl-Template-Toolkit-2.09-39 Sat 29 Nov 2003 11:18:03 PM CET perl-GD-2.07-47 Sat 29 Nov 2003 10:53:33 PM CET gd-2.0.15-48 Sat 29 Nov 2003 10:53:32 PM CET The error is: richard@pilchard:/usr/tmp> ./simple.pl > tmp1 Can't locate GD/Graph/bars.pm in @INC (@INC contains: /usr/lib/perl5/5.8.1/i586-linux-thread-multi /usr/lib/perl5/5.8.1 /usr/lib/perl5/site_perl/5.8.1/i586-linux-thread-multi /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.1/i586-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.1 /usr/lib/perl5/vendor_perl .) at ./simple.pl line 5. -- Richard Bos Without a home the journey is endless #!/usr/bin/perl -w # Change above line to point to your perl binary use CGI ':standard'; use GD::Graph::bars; use strict; # Both the arrays should same number of entries. my @data = (["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], [23, 5, 2, 20, 11, 33, 7, 31, 77, 18, 65, 52]); my $mygraph = GD::Graph::bars->new(500, 300); $mygraph->set( x_label => 'Month', y_label => 'Number of Hits', title => 'Number of Hits in Each Month in 2002', ) or warn $mygraph->error; my $myimage = $mygraph->plot(\@data) or die $mygraph->error; print "Content-type: image/png\n\n"; print $myimage->png;
Richard Bos wrote:
perl-Template-Toolkit-2.09-39 Sat 29 Nov 2003 11:18:03 PM CET perl-GD-2.07-47 Sat 29 Nov 2003 10:53:33 PM CET gd-2.0.15-48 Sat 29 Nov 2003 10:53:32 PM CET
Do you actually have the GD::Graph module installed? http://search.cpan.org/CPAN/authors/id/M/MV/MVERB/GDGraph-1.43.tar.gz sjb
Op zondag 30 november 2003 00:21, schreef sjb:
Richard Bos wrote:
perl-Template-Toolkit-2.09-39 Sat 29 Nov 2003 11:18:03 PM CET perl-GD-2.07-47 Sat 29 Nov 2003 10:53:33 PM CET gd-2.0.15-48 Sat 29 Nov 2003 10:53:32 PM CET
Do you actually have the GD::Graph module installed?
http://search.cpan.org/CPAN/authors/id/M/MV/MVERB/GDGraph-1.43.tar.gz
sjb
Yes it is: richard@pilchard:~/cvs/apt4rpm> rpm -ql perl-Template-Toolkit-2.09-39 perl-GD-2.07-47 | grep GD/Graph/bars /usr/lib/perl5/vendor_perl/5.8.1/i586-linux-thread-multi/Template/Plugin/GD/Graph/bars.pm /usr/lib/perl5/vendor_perl/5.8.1/i586-linux-thread-multi/Template/Plugin/GD/Graph/bars3d.pm But as you can see they are installed under Template/Plugin/ so something must be done with that (Template/Plugin/), but how....?? -- Richard Bos Without a home the journey is endless
participants (2)
-
Richard Bos
-
sjb