.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Sepia::Xref 3pm" .TH Sepia::Xref 3pm "2022-06-26" "perl v5.34.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Sepia::Xref \- Generates cross reference database for use by Perl programs. .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Sepia::Xref qw(rebuild defs callers); \& \& rebuild; \& for (defs \*(Aqfoo\*(Aq) { \& printf "%s:%d: sub %s\e::foo() defined\en", @{$_}[0..2]; \& } \& \& for (callers \*(Aqfoo\*(Aq) { \& printf "%s:%d: sub foo() called by %s\e::%s().\en", @{$_}[0..3]; \& } .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\f(CW\*(C`Sepia::Xref\*(C'\fR is intended as a programmatic interface to the information supplied by B::Xref. It is intended to be a component for interactive Perl development, with other packages providing a friendly interface to the raw information it extracts. \f(CW\*(C`B::Xref\*(C'\fR could be seen as an example of this sort of user-level tool, if it weren't for the fact that this module was created later, and stole most of its code. .SS "Variables" .IX Subsection "Variables" .ie n .IP "%call" 4 .el .IP "\f(CW%call\fR" 4 .IX Item "%call" A map of subs to call locations and callers .ie n .IP "%callby" 4 .el .IP "\f(CW%callby\fR" 4 .IX Item "%callby" A map of subs to subs called. .ie n .IP "%var_use" 4 .el .IP "\f(CW%var_use\fR" 4 .IX Item "%var_use" A map of global/package variables to uses. .ie n .IP "%var_def" 4 .el .IP "\f(CW%var_def\fR" 4 .IX Item "%var_def" A map of global/package variables to definitions (usually empty, since it only picks up local (...) declarations. .SS "Functions" .IX Subsection "Functions" .ie n .IP """guess_module_file($pack, $ofile)""" 4 .el .IP "\f(CWguess_module_file($pack, $ofile)\fR" 4 .IX Item "guess_module_file($pack, $ofile)" \&\s-1XXX:\s0 it turns out that rooting around trying to figure out the file ourselves is more reliable than what we grab from the op. Are we doing this wrong? .ie n .IP """rebuild()""" 4 .el .IP "\f(CWrebuild()\fR" 4 .IX Item "rebuild()" Rebuild the Xref database. .ie n .IP """forget($func [, $mod])""" 4 .el .IP "\f(CWforget($func [, $mod])\fR" 4 .IX Item "forget($func [, $mod])" Forget that \f(CW$func\fR was defined. .ie n .IP """redefined($func [, $pack])""" 4 .el .IP "\f(CWredefined($func [, $pack])\fR" 4 .IX Item "redefined($func [, $pack])" Recompute xref info for \f(CW$func\fR, or \f(CW\*(C`$pack::$func\*(C'\fR if \f(CW$pack\fR given. .ie n .IP """callers($func)""" 4 .el .IP "\f(CWcallers($func)\fR" 4 .IX Item "callers($func)" List callers of \f(CW$func\fR. .ie n .IP """callees($func)""" 4 .el .IP "\f(CWcallees($func)\fR" 4 .IX Item "callees($func)" List callees of \f(CW$func\fR. .ie n .IP """var_defs($var)""" 4 .el .IP "\f(CWvar_defs($var)\fR" 4 .IX Item "var_defs($var)" Find locations where \f(CW$var\fR is defined. .ie n .IP """var_uses($var)""" 4 .el .IP "\f(CWvar_uses($var)\fR" 4 .IX Item "var_uses($var)" Find locations where \f(CW$var\fR is used. .ie n .IP """var_assigns($var)""" 4 .el .IP "\f(CWvar_assigns($var)\fR" 4 .IX Item "var_assigns($var)" Find locations where \f(CW$var\fR is assigned to. .ie n .IP """file_modules($file)""" 4 .el .IP "\f(CWfile_modules($file)\fR" 4 .IX Item "file_modules($file)" List the modules defined in file \f(CW$file\fR. .ie n .IP """var_apropos($expr)""" 4 .el .IP "\f(CWvar_apropos($expr)\fR" 4 .IX Item "var_apropos($expr)" Find variables matching \f(CW$expr\fR. .SH "EXPORTS" .IX Header "EXPORTS" Nothing by default, but all sub and variable described above can be imported. \f(CW\*(C`Sepia::Xref\*(C'\fR also defines the tags \f(CW\*(C`:most\*(C'\fR for the above-listed functions, and \f(CW\*(C`:all\*(C'\fR for those and the variables as well. .SH "BUGS" .IX Header "BUGS" .IP "See B::Xref." 4 .IX Item "See B::Xref." .PD 0 .IP "module names are ignored when looking up a sub." 4 .IX Item "module names are ignored when looking up a sub." .IP "file and line number guessing is evil" 4 .IX Item "file and line number guessing is evil" .PD Both should be done more cleanly and effectively. This is a hack because I don't quite understand what perl saves. We should be able to do as well as its warning messages. .IP "Some packages are not xref'd." 4 .IX Item "Some packages are not xref'd." Some \*(L"internal\*(R" packages are deliberately not cross-referenced, either because they are hairy and cause us problems, or because they are so commonly included as to be uninteresting. The current list includes all pragmatic modules, plus: B, O, AutoLoader, DynaLoader, XSLoader, Config, \s-1DB, VMS,\s0 FileHandle, Exporter, Carp, PerlIO::Layer. .IP "Tree-view is not fully functional" 4 .IX Item "Tree-view is not fully functional" Ideally, clicking the function names in tree view would take you to that function. This doesn't work. Also, more keys (like \*(L"q\*(R" to quit) should be implemented. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\f(CW\*(C`B::Xref\*(C'\fR, of which \f(CW\*(C`Sepia::Xref\*(C'\fR is a bastard child. .SH "AUTHOR" .IX Header "AUTHOR" B::Xref by Malcolm Beattie, m(angl|odifi)ed by Sean O'Rourke (seano@cpan.org).