Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

C::Analyzer, can't locate object method new

by dHarry (Abbot)
on Nov 11, 2008 at 12:48 UTC ( [id://722839]=perlquestion: print w/replies, xml ) Need Help??

dHarry has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks,

I want to produce a functional calltree of C programs. C::Analyzer seemed just the the right candidate to do that. My script:

use strict; use warnings; use C::Analyzer; my $analyzer = new Analyzer( _inputPath => "C:/Dev-Cpp/drl_ral", _cppPath => "C:/Dev-Cpp/bin", _inputOption => "dir_and_subdir", );

However I run into the following error message:

Can't locate object method "new" via package "Analyzer" (perhaps you forgot to load "Analyzer"?)

I am pretty sure it installs correctly and Analyzer.pm does contain a new method. Any idea why I get the message or better: how to solve it?

Cheers
dHarry

Replies are listed 'Best First'.
Re: C::Analyzer, can't locate object method new
by Crian (Curate) on Nov 11, 2008 at 13:14 UTC
      After reading the documentation I don't think, that the C:: ist your problem, but I have no further idea.

      The documentation might be wrong, though.

        Since the source uses package C::Analyzer, not package Analyzer, that's the way that it must be addressed in code (short of some sort of aliasing operation). Thus, as you say, the documentation is wrong. I have e-mailed the maintainer to let him know.
Re: C::Analyzer, can't locate object method new
by duckyd (Hermit) on Nov 11, 2008 at 16:33 UTC
    If you'd like to alias it, you could use aliased:
    use aliased 'C::Analyzer'; my $analyzer = new Analyzer(.....

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://722839]
Approved by almut
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2024-04-26 07:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found