[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] Prodecure Location Documentation
> -----Original Message-----
> From: interchange-users-admin@icdevgroup.org
> [mailto:interchange-users-admin@icdevgroup.org]On Behalf Of René Hertell
> Sent: Wednesday, June 19, 2002 8:10 AM
> To: interchange-users@icdevgroup.org
> Subject: RE: [ic] Prodecure Location Documentation
>
>
> > >No, there isn't such a document, and it's a very low priority
> > because it's
> > >so easy to get real-time answers:
> > >
> > >cd interchange/lib/Vend
> > >grep -r 'sub display_page' *
> > >
> > >etc.
> >
> > Thanks for letting me know - I was unfamilier with that command.
> > Those of us
> > that are "MS to Linux converts in progress" may not be familiar
> > with all the
> > Linux commands - that is a good one.
>
> Steve, with
>
> grep -r 'sub ' * > all_subroutines.dump
>
> you should get all subroutines into the all_subroutines.dump file.
>
Just download a copy of ctags and use that to index everything.
Ctags used to be a C source cross-referencing tool, but now works
with a whole heap of languages, including Perl. The latest version
is 5.2.3. (http://ctags.sourceforge.net/)
Once you have your tags file, simply edit a source file using one
of the supported editors, such as vi/vim as you would normally.
If you find a subroutine call, (in vi) press control-] and the
editor will jump to the sub's source. Keep doing that until you
get bored. To return back to the previous location (the caller
of the sub), press ^T (in vi).
Different editors will have different ways of handling tags files.
Ctags has been around for almost as long as vi, so vi/vim probably
has the best support for tags files. I wouldn't know, I don't use
any other editors on UNIX.
The tags file will contain lines that look a little like this
(4.8.x source):
...
tag_area lib/Vend/Interpolate.pm /^sub tag_area {$/;" s
tag_assign lib/Vend/Interpolate.pm /^sub tag_assign {$/;" s
tag_attr_list lib/Vend/Interpolate.pm /^sub tag_attr_list {$/;" s
tag_banner lib/Vend/Interpolate.pm /^sub tag_banner {$/;" s
tag_calc lib/Vend/Interpolate.pm /^sub tag_calc {$/;" s
tag_cart lib/Vend/Interpolate.pm /^sub tag_cart {$/;" s
...
Some people will know that tag_area is in Interpolate.pm, others
may simply type "vi -t tag_area" to be taken there. Once you are
looking at the tag_area sub, you can jump to the form_link sub
without having to know where it is.
I'm sure someone will find this useful.
--
_/ _/ _/_/_/_/ _/ _/ _/_/_/ _/ _/
_/_/_/ _/_/ _/ _/ _/ _/_/ _/ K e v i n W a l s h
_/ _/ _/ _/ _/ _/ _/ _/_/ kevin@cursor.biz
_/ _/ _/_/_/_/ _/ _/_/_/ _/ _/