I can't take the time to install GD::Graph right now and test this, but here are some friendly thoughts as to how to effeciently go about debugging your code -- and ask for help when something goes wrong.

You say the script doesn't work, but don't explain what you mean. Does it crap out with a 500 Internal Server Error? Does it die at a particular line? Does it not produce the results you expect, or nothing at all? The more specific you can be about what you've done and what's going wrong, the more useful responses you'll get.

I would start by trying to trim the problem down to the smallest possible scope, create a test case that works, and build up from there. Debugging CGI is generally a hassle; can you (temporarily) throw away the CGI part and just try generating the image from the command line? Can you try to generate the simplest possible chart from your data set (leaving out all the legends and other information)? Can you construct an artificial data set with constrained data?

Once you have a working core, you can incrementally add back features until something breaks, and you will know that whtever change you last made is the one that's causing the problem.


In reply to Re: Re: Flat File Database & GD::Graph (REVISITED) by seattlejohn
in thread Flat File Database & GD::Graph (REVISITED) by suggus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.