in reply to Problems with references using GD::Graph::Data

You need to add more error checking. Often the man pages are very terse and skip it, but it becomes really valuable once you begin writing code of any significant length.

In this case, a quick look at the GD::Graph::Data POD suggests that calling the error() method might tell you what went wrong.

Lots of additional error info is discussed in the GD::Graph::Error POD, including the $GD::Graph::Error::Debug variable which might also give you a better hint.

And use RaiseError on your DBI handle! See the DBI docs if you aren't familiar with it. It makes your error handling both simpler and more robust since you don't have to add error checks, and you don't have to remember to add error checks.

  • Comment on Re: Problems with references using GD::Graph::Data