⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 perldebguts.1

📁 视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.
💻 1
📖 第 1 页 / 共 3 页
字号:
.\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.05).\".\" Standard preamble:.\" ========================================================================.de Sh \" Subsection heading.br.if t .Sp.ne 5.PP\fB\\$1\fR.PP...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" '''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 turned on, we'll generate index entries on stderr for.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index.\" entries marked with X<> in POD.  Of course, you'll have to process the.\" output yourself in some meaningful fashion..ie \nF \{\.    de IX.    tm Index:\\$1\t\\n%\t"\\$2"...    nr % 0.    rr F.\}.el \{\.    de IX...\}.\".\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2)..\" Fear.  Run.  Save yourself.  No user-serviceable parts..    \" fudge factors for nroff and troff.if n \{\.    ds #H 0.    ds #V .8m.    ds #F .3m.    ds #[ \f1.    ds #] \fP.\}.if t \{\.    ds #H ((1u-(\\\\n(.fu%2u))*.13m).    ds #V .6m.    ds #F 0.    ds #[ \&.    ds #] \&.\}.    \" simple accents for nroff and troff.if n \{\.    ds ' \&.    ds ` \&.    ds ^ \&.    ds , \&.    ds ~ ~.    ds /.\}.if t \{\.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u".    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'.\}.    \" troff and (daisy-wheel) nroff accents.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'.ds 8 \h'\*(#H'\(*b\h'-\*(#H'.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#].ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#].ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#].ds ae a\h'-(\w'a'u*4/10)'e.ds Ae A\h'-(\w'A'u*4/10)'E.    \" corrections for vroff.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'.    \" for low resolution devices (crt and lpr).if \n(.H>23 .if \n(.V>19 \\{\.    ds : e.    ds 8 ss.    ds o a.    ds d- d\h'-1'\(ga.    ds D- D\h'-1'\(hy.    ds th \o'bp'.    ds Th \o'LP'.    ds ae ae.    ds Ae AE.\}.rm #[ #] #H #V #F C.\" ========================================================================.\".IX Title "PERLDEBGUTS 1".TH PERLDEBGUTS 1 "2007-12-18" "perl v5.10.0" "Perl Programmers Reference Guide".\" 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"perldebguts \- Guts of Perl debugging.SH "DESCRIPTION".IX Header "DESCRIPTION"This is not the \fIperldebug\fR\|(1) manpage, which tells you how to usethe debugger.  This manpage describes low-level details concerningthe debugger's internals, which range from difficult to impossibleto understand for anyone who isn't incredibly intimate with Perl's guts.Caveat lector..SH "Debugger Internals".IX Header "Debugger Internals"Perl has special debugging hooks at compile-time and run-time usedto create debugging environments.  These hooks are not to be confusedwith the \fIperl \-Dxxx\fR command described in perlrun, which isusable only if a special Perl is built per the instructions in the\&\fI\s-1INSTALL\s0\fR podpage in the Perl source tree..PPFor example, whenever you call Perl's built-in \f(CW\*(C`caller\*(C'\fR functionfrom the package \f(CW\*(C`DB\*(C'\fR, the arguments that the corresponding stackframe was called with are copied to the \f(CW@DB::args\fR array.  Thesemechanisms are enabled by calling Perl with the \fB\-d\fR switch.Specifically, the following additional features are enabled(cf. \*(L"$^P\*(R" in perlvar):.IP "\(bu" 4Perl inserts the contents of \f(CW$ENV{PERL5DB}\fR (or \f(CW\*(C`BEGIN {require\&\*(Aqperl5db.pl\*(Aq}\*(C'\fR if not present) before the first line of your program..IP "\(bu" 4Each array \f(CW\*(C`@{"_<$filename"}\*(C'\fR holds the lines of \f(CW$filename\fR for afile compiled by Perl.  The same is also true for \f(CW\*(C`eval\*(C'\fRed stringsthat contain subroutines, or which are currently being executed.The \f(CW$filename\fR for \f(CW\*(C`eval\*(C'\fRed strings looks like \f(CW\*(C`(eval 34)\*(C'\fR.Code assertions in regexes look like \f(CW\*(C`(re_eval 19)\*(C'\fR..SpValues in this array are magical in numeric context: they compareequal to zero only if the line is not breakable..IP "\(bu" 4Each hash \f(CW\*(C`%{"_<$filename"}\*(C'\fR contains breakpoints and actions keyedby line number.  Individual entries (as opposed to the whole hash)are settable.  Perl only cares about Boolean true here, althoughthe values used by \fIperl5db.pl\fR have the form\&\f(CW"$break_condition\e0$action"\fR..SpThe same holds for evaluated strings that contain subroutines, orwhich are currently being executed.  The \f(CW$filename\fR for \f(CW\*(C`eval\*(C'\fRed stringslooks like \f(CW\*(C`(eval 34)\*(C'\fR or  \f(CW\*(C`(re_eval 19)\*(C'\fR..IP "\(bu" 4Each scalar \f(CW\*(C`${"_<$filename"}\*(C'\fR contains \f(CW"_<$filename"\fR.  This isalso the case for evaluated strings that contain subroutines, orwhich are currently being executed.  The \f(CW$filename\fR for \f(CW\*(C`eval\*(C'\fRedstrings looks like \f(CW\*(C`(eval 34)\*(C'\fR or \f(CW\*(C`(re_eval 19)\*(C'\fR..IP "\(bu" 4After each \f(CW\*(C`require\*(C'\fRd file is compiled, but before it is executed,\&\f(CW\*(C`DB::postponed(*{"_<$filename"})\*(C'\fR is called if the subroutine\&\f(CW\*(C`DB::postponed\*(C'\fR exists.  Here, the \f(CW$filename\fR is the expanded name ofthe \f(CW\*(C`require\*(C'\fRd file, as found in the values of \f(CW%INC\fR..IP "\(bu" 4After each subroutine \f(CW\*(C`subname\*(C'\fR is compiled, the existence of\&\f(CW$DB::postponed{subname}\fR is checked.  If this key exists,\&\f(CW\*(C`DB::postponed(subname)\*(C'\fR is called if the \f(CW\*(C`DB::postponed\*(C'\fR subroutinealso exists..IP "\(bu" 4A hash \f(CW%DB::sub\fR is maintained, whose keys are subroutine namesand whose values have the form \f(CW\*(C`filename:startline\-endline\*(C'\fR.\&\f(CW\*(C`filename\*(C'\fR has the form \f(CW\*(C`(eval 34)\*(C'\fR for subroutines defined inside\&\f(CW\*(C`eval\*(C'\fRs, or \f(CW\*(C`(re_eval 19)\*(C'\fR for those within regex code assertions..IP "\(bu" 4When the execution of your program reaches a point that can hold abreakpoint, the \f(CW\*(C`DB::DB()\*(C'\fR subroutine is called if any of the variables\&\f(CW$DB::trace\fR, \f(CW$DB::single\fR, or \f(CW$DB::signal\fR is true.  These variablesare not \f(CW\*(C`local\*(C'\fRizable.  This feature is disabled when executinginside \f(CW\*(C`DB::DB()\*(C'\fR, including functions called from it unless \f(CW\*(C`$^D & (1<<30)\*(C'\fR is true..IP "\(bu" 4When execution of the program reaches a subroutine call, a call to\&\f(CW&DB::sub\fR(\fIargs\fR) is made instead, with \f(CW$DB::sub\fR holding thename of the called subroutine. (This doesn't happen if the subroutinewas compiled in the \f(CW\*(C`DB\*(C'\fR package.).PPNote that if \f(CW&DB::sub\fR needs external data for it to work, nosubroutine call is possible without it. As an example, the standarddebugger's \f(CW&DB::sub\fR depends on the \f(CW$DB::deep\fR variable(it defines how many levels of recursion deep into the debugger you can gobefore a mandatory break).  If \f(CW$DB::deep\fR is not defined, subroutinecalls are not possible, even though \f(CW&DB::sub\fR exists..Sh "Writing Your Own Debugger".IX Subsection "Writing Your Own Debugger"\fIEnvironment Variables\fR.IX Subsection "Environment Variables".PPThe \f(CW\*(C`PERL5DB\*(C'\fR environment variable can be used to define a debugger.For example, the minimal \*(L"working\*(R" debugger (it actually doesn't do anything)consists of one line:.PP.Vb 1\&  sub DB::DB {}.Ve.PPIt can easily be defined like this:.PP.Vb 1\&  $ PERL5DB="sub DB::DB {}" perl \-d your\-script.Ve.PPAnother brief debugger, slightly more useful, can be createdwith only the line:.PP.Vb 1\&  sub DB::DB {print ++$i; scalar <STDIN>}.Ve.PPThis debugger prints a number which increments for each statementencountered and waits for you to hit a newline before continuingto the next statement..PPThe following debugger is actually useful:.PP.Vb 5\&  {\&    package DB;\&    sub DB  {}\&    sub sub {print ++$i, " $sub\en"; &$sub}\&  }.Ve.PPIt prints the sequence number of each subroutine call and the name of thecalled subroutine.  Note that \f(CW&DB::sub\fR is being compiled into thepackage \f(CW\*(C`DB\*(C'\fR through the use of the \f(CW\*(C`package\*(C'\fR directive..PPWhen it starts, the debugger reads your rc file (\fI./.perldb\fR or\&\fI~/.perldb\fR under Unix), which can set important options.(A subroutine (\f(CW&afterinit\fR) can be defined here as well; it is executedafter the debugger completes its own initialization.).PPAfter the rc file is read, the debugger reads the \s-1PERLDB_OPTS\s0environment variable and uses it to set debugger options. Thecontents of this variable are treated as if they were the argumentof an \f(CW\*(C`o ...\*(C'\fR debugger command (q.v. in \*(L"Options\*(R" in perldebug)..PP\fIDebugger internal variables In addition to the file and subroutine-related variables mentioned above, the debugger also maintains various magical internal variables.\fR.IX Subsection "Debugger internal variables In addition to the file and subroutine-related variables mentioned above, the debugger also maintains various magical internal variables.".IP "\(bu" 4\&\f(CW@DB::dbline\fR is an alias for \f(CW\*(C`@{"::_<current_file"}\*(C'\fR, whichholds the lines of the currently-selected file (compiled by Perl), eitherexplicitly chosen with the debugger's \f(CW\*(C`f\*(C'\fR command, or implicitly by flowof execution..SpValues in this array are magical in numeric context: they compareequal to zero only if the line is not breakable..IP "\(bu" 4\&\f(CW%DB::dbline\fR, is an alias for \f(CW\*(C`%{"::_<current_file"}\*(C'\fR, whichcontains breakpoints and actions keyed by line number inthe currently-selected file, either explicitly chosen with thedebugger's \f(CW\*(C`f\*(C'\fR command, or implicitly by flow of execution..SpAs previously noted, individual entries (as opposed to the whole hash)are settable.  Perl only cares about Boolean true here, althoughthe values used by \fIperl5db.pl\fR have the form\&\f(CW"$break_condition\e0$action"\fR..PP\fIDebugger customization functions\fR.IX Subsection "Debugger customization functions".PPSome functions are provided to simplify customization..IP "\(bu" 4See \*(L"Configurable Options\*(R" in perldebug for a description of options parsed by\&\f(CW\*(C`DB::parse_options(string)\*(C'\fR..IP "\(bu" 4\&\f(CW\*(C`DB::dump_trace(skip[,count])\*(C'\fR skips the specified number of framesand returns a list containing information about the calling frames (allof them, if \f(CW\*(C`count\*(C'\fR is missing).  Each entry is reference to a hashwith keys \f(CW\*(C`context\*(C'\fR (either \f(CW\*(C`.\*(C'\fR, \f(CW\*(C`$\*(C'\fR, or \f(CW\*(C`@\*(C'\fR), \f(CW\*(C`sub\*(C'\fR (subroutinename, or info about \f(CW\*(C`eval\*(C'\fR), \f(CW\*(C`args\*(C'\fR (\f(CW\*(C`undef\*(C'\fR or a reference toan array), \f(CW\*(C`file\*(C'\fR, and \f(CW\*(C`line\*(C'\fR..IP "\(bu" 4\&\f(CW\*(C`DB::print_trace(FH, skip[, count[, short]])\*(C'\fR printsformatted info about caller frames.  The last two functions may beconvenient as arguments to \f(CW\*(C`<\*(C'\fR, \f(CW\*(C`<<\*(C'\fR commands..PPNote that any variables and functions that are not documented inthis manpages (or in perldebug) are considered for internal   use only, and as such are subject to change without notice..SH "Frame Listing Output Examples".IX Header "Frame Listing Output Examples"The \f(CW\*(C`frame\*(C'\fR option can be used to control the output of frame information.  For example, contrast this expression trace:.PP.Vb 2\& $ perl \-de 42\& Stack dump during die enabled outside of evals.\&\& Loading DB routines from perl5db.pl patch level 0.94\& Emacs support available.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -