Hi Josh ,
Though i was able generate the graph earlier today , iam erroring out with
this error . Though i thought it was PATH error , i have added GD path but does'nt
seem to work.
Can't locate object method "new" via package "GD::Graph::bars" at lisa_test.asp line
78. ,
/Net/stmdvocs/sbcexp/devl/SunOS/sparc-5.6/run/pd/cpan/5.6.1-eval/lib/Apache/ASP.pm
line 1556
Tried to generate with a general script but does'nt work either
<%
$|++;
use strict;
use GD::Graph::bars;
my @data =
(["Jan-01","Feb-01","Mar-01","Apr-01","May-01","Jun-01","Jul-01","Aug-01","Sep-01"],[21,25,33,39,49,48,40,45,15],[58,55,62,48,45,44,41,35,43]);
my $graph = new GD::Graph::bars;
$graph->set(
x_label => 'Month',
y_label => 'Revenue ($1,000s)',
title => 'Monthly Online vs. Catalog Sales for 2001',
bar_spacing => 3,
long_ticks => 1,
show_values => 1,
) or warn $graph->error;
$graph->set_legend( 'Online', 'Catalog' );
$graph->plot(\@data) or die $graph->error;
my $chart = $graph;
my $name = "TestGraph";
my $ext = $chart->export_format;
open(OUT, ">$name.$ext") or die "Cannot open $name.$ext for write: $!";
binmode OUT;
print OUT $chart->gd->$ext();
close OUT;
$Response->{ContentType} = 'image/PNG';
open(FILE, "$name.$ext") || die "can't open $name.$ext";
binmode FILE;
$/ = undef;
my $data = <FILE>;
$Response->Clear;
$Response->AddHeader('Content-Length', length $data);
$Response->End();
%>
Is there any commadline tool to debug like CGI ?
Thanks
Raghu
-----Original Message-----
From: Josh Chamas [mailto:josh@;chamas.com]
Sent: Monday, October 21, 2002 10:18 PM
To: Nalamada, Raghu
Cc: [EMAIL PROTECTED]
Subject: Re: Asp
[EMAIL PROTECTED] wrote:
> Hi ,
>
> Iam trying to replicate the graph generation i using GD module using apache::ASP.
>
> As iam not sure how to check for complie errors as i cannot see anything error
>which i can understand either in apache logs or on the browser trying to seek your
>help.
>
> Could some one pls point what might be wrong.
>
Normally when perl does not give you a good compile error message,
things are in a pretty odd state. You might start by commenting
out large chunks of code at a time with
=pod
CODE
=cut
and see which piece of your script is generating the error.
Also, do not define a sub {} in your script, as that will only
cause you headaches with closure problems with variabled being
scoped improperly.
You might set PerlWarn and PerlSetVar UseStrict to help catch
these errors.
Regards,
Josh
________________________________________________________________
Josh Chamas, Founder phone:925-552-0128
Chamas Enterprises Inc. http://www.chamas.com
NodeWorks Link Checking http://www.nodeworks.com
Visit our website at http://www.ubswarburg.com
This message contains confidential information and is intended only
for the individual named. If you are not the named addressee you
should not disseminate, distribute or copy this e-mail. Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.
E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses. The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail transmission. If
verification is required please request a hard-copy version. This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]