Dan Anderson wrote:
> I am trying out GD::Graph, which is a CPAN module that
> creates a method
> new, and then for each graph type inherits that new method (I
> think -- I
> had to open the code).
> 
> So I tried calling:
> 
> my $graph = GD::Graph::bars->new(400, 600);
> 
> And I get the error:
> 
> Can't locate object method "new" via package
> "GD::Graph::bars" (perhaps
> you forgot to load "GD::Graph::bars"?) at - line 12.
> 
> Now I know everything was installed.  And I cracked the source to find
> that GD::Graph::bars should inherit new, but perl seems confused.
> 
> What am I doing wrong?

Do you have "use GD::Graph::bars" in your program? A plain "use GD::Graph"
is not sufficient.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to