Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

cscope & perl

by johnxpan (Initiate)
on Jun 23, 2009 at 23:56 UTC ( [id://774202]=perlquestion: print w/replies, xml ) Need Help??

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

I am setting up my perl developing environment. I used the cscope/ddd/emacs for my C/C++ development. Applying ddd/emacs to perl is piece of cake. But I can't find any information about how to use cscope for perl. In the cscope wikipage (http://en.wikipedia.org/wiki/Cscope) I did find the following claim: cscope is often used to search content within C or C++ files, but it can be used to search for content in other languages such as Java, Python, PHP and Perl. Does any of your gurus know how to use cscope with perl? Thanks;

Replies are listed 'Best First'.
Re: cscope & perl
by rcaputo (Chaplain) on Mar 22, 2011 at 19:37 UTC

    The magic that I didn't see on this thread is how to invoke cscope to build the database:

    find /home/troc/project/foo -name '*.pl' -o -name '*.pm' -o -name '*.t +' | grep -v blib | cscope -b -q -i -
    I read on the web that cscope only pays attention to C-style file extensions unless you find and include specific files yourself.

      Might be a bit easier to do:

      ack -f --perl | cscope -b -q -i -
      Having done that, my editor doesn't take cscope output - but it does tack ctags output, so same idea:
      ack -f --perl | ctags -L -
      If you don't have ack, you should. It's written in perl, and is way easier to use than grep, with way more functionality.

Re: cscope & perl
by jplindstrom (Monsignor) on Jun 26, 2009 at 11:01 UTC
    Never heard of DDD (debugger frontent) before, but it sounds interesting.

    Do you use it as a frontend to gdb, or to GUD/perldb?

    /J

      Its not exactly a frontend to gdb. It's another frontend like gdb. It is gui based unlike the term based gdb. Pari
        Just looked at the DDD website and I stand corrected - "GNU DDD is a graphical front-end for command-line debuggers such as GDB, DBX, WDB, Ladebug, JDB, XDB, the Perl debugger, the bash debugger bashdb, the GNU Make debugger remake, or the Python debugger pydb." Pari
Re: cscope & perl
by Anonymous Monk on Jun 24, 2009 at 09:47 UTC
    cscope usage doesn't depend on the target
      Thanks for the prompt reply, I managed to created the cscope file for my perl codebase, but it doesn't load to emacs at all. Any idea?
        Hi John, How did you create the cscope db for your perl source code? I am looking for the same thing (although with vi). Can you share some info? Pari
        Sorry, don't use emacs :/

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2024-04-25 14:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found