Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

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

by dHarry (Abbot)
on Nov 11, 2008 at 12:48 UTC ( #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 (Chaplain) 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
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? | Other CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2018-09-21 10:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Eventually, "covfefe" will come to mean:













    Results (185 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!