b::deparse.3

来自「视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.」· 3 代码 · 共 614 行 · 第 1/2 页

3
614
字号
.\" 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 "B::Deparse 3".TH B::Deparse 3 "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"B::Deparse \- Perl compiler backend to produce perl code.SH "SYNOPSIS".IX Header "SYNOPSIS"\&\fBperl\fR \fB\-MO=Deparse\fR[\fB,\-d\fR][\fB,\-f\fR\fI\s-1FILE\s0\fR][\fB,\-p\fR][\fB,\-q\fR][\fB,\-l\fR]        [\fB,\-s\fR\fI\s-1LETTERS\s0\fR][\fB,\-x\fR\fI\s-1LEVEL\s0\fR] \fIprog.pl\fR.SH "DESCRIPTION".IX Header "DESCRIPTION"B::Deparse is a backend module for the Perl compiler that generatesperl source code, based on the internal compiled structure that perlitself creates after parsing a program. The output of B::Deparse won'tbe exactly the same as the original source, since perl doesn't keeptrack of comments or whitespace, and there isn't a one-to-onecorrespondence between perl's syntactical constructions and theircompiled form, but it will often be close. When you use the \fB\-p\fRoption, the output also includes parentheses even when they are notrequired by precedence, which can make it easy to see if perl isparsing your expressions the way you intended..PPWhile B::Deparse goes to some lengths to try to figure out what youroriginal program was doing, some parts of the language can still tripit up; it still fails even on some parts of Perl's own test suite. Ifyou encounter a failure other than the most common ones described inthe \s-1BUGS\s0 section below, you can help contribute to B::Deparse'songoing development by submitting a bug report with a smallexample..SH "OPTIONS".IX Header "OPTIONS"As with all compiler backend options, these must follow directly afterthe '\-MO=Deparse', separated by a comma but not any white space..IP "\fB\-d\fR" 4.IX Item "-d"Output data values (when they appear as constants) using Data::Dumper.Without this option, B::Deparse will use some simple routines of itsown for the same purpose. Currently, Data::Dumper is better for somekinds of data (such as complex structures with sharing andself-reference) while the built-in routines are better for others(such as odd floating-point values)..IP "\fB\-f\fR\fI\s-1FILE\s0\fR" 4.IX Item "-fFILE"Normally, B::Deparse deparses the main code of a program, and all the subsdefined in the same file. To include subs defined in other files, pass the\&\fB\-f\fR option with the filename. You can pass the \fB\-f\fR option several times, toinclude more than one secondary file.  (Most of the time you don't want touse it at all.)  You can also use this option to include subs which aredefined in the scope of a \fB#line\fR directive with two parameters..IP "\fB\-l\fR" 4.IX Item "-l"Add '#line' declarations to the output based on the line and filelocations of the original code..IP "\fB\-p\fR" 4.IX Item "-p"Print extra parentheses. Without this option, B::Deparse includesparentheses in its output only when they are needed, based on thestructure of your program. With \fB\-p\fR, it uses parentheses (almost)whenever they would be legal. This can be useful if you are used to\&\s-1LISP\s0, or if you want to see how perl parses your input. If you say.Sp.Vb 3\&    if ($var & 0x7f == 65) {print "Gimme an A!"}\&    print ($which ? $a : $b), "\en";\&    $name = $ENV{USER} or "Bob";.Ve.Sp\&\f(CW\*(C`B::Deparse,\-p\*(C'\fR will print.Sp.Vb 5\&    if (($var & 0)) {\&        print(\*(AqGimme an A!\*(Aq)\&    };\&    (print(($which ? $a : $b)), \*(Aq???\*(Aq);\&    (($name = $ENV{\*(AqUSER\*(Aq}) or \*(Aq???\*(Aq).Ve.Spwhich probably isn't what you intended (the \f(CW\*(Aq???\*(Aq\fR is a sign thatperl optimized away a constant value)..IP "\fB\-P\fR" 4.IX Item "-P"Disable prototype checking. With this option, all function calls aredeparsed as if no prototype was defined for them. In other words,.Sp.Vb 1\&    perl \-MO=Deparse,\-P \-e \*(Aqsub foo (\e@) { 1 } foo @x\*(Aq.Ve.Spwill print.Sp.Vb 4\&    sub foo (\e@) {\&        1;\&    }\&    &foo(\e@x);.Ve.Spmaking clear how the parameters are actually passed to \f(CW\*(C`foo\*(C'\fR..IP "\fB\-q\fR" 4.IX Item "-q"Expand double-quoted strings into the corresponding combinations ofconcatenation, uc, ucfirst, lc, lcfirst, quotemeta, and join. Forinstance, print.Sp.Vb 1\&    print "Hello, $world, @ladies, \eu$gentlemen\eE, \eu\eL$me!";.Ve.Spas.Sp.Vb 2\&    print \*(AqHello, \*(Aq . $world . \*(Aq, \*(Aq . join($", @ladies) . \*(Aq, \*(Aq\&          . ucfirst($gentlemen) . \*(Aq, \*(Aq . ucfirst(lc $me . \*(Aq!\*(Aq);.Ve.SpNote that the expanded form represents the way perl handles suchconstructions internally \*(-- this option actually turns off the reversetranslation that B::Deparse usually does. On the other hand, note that\&\f(CW\*(C`$x = "$y"\*(C'\fR is not the same as \f(CW\*(C`$x = $y\*(C'\fR: the former makes the valueof \f(CW$y\fR into a string before doing the assignment..IP "\fB\-s\fR\fI\s-1LETTERS\s0\fR" 4.IX Item "-sLETTERS"Tweak the style of B::Deparse's output. The letters should followdirectly after the 's', with no space or punctuation. The followingoptions are available:.RS 4.IP "\fBC\fR" 4.IX Item "C"Cuddle \f(CW\*(C`elsif\*(C'\fR, \f(CW\*(C`else\*(C'\fR, and \f(CW\*(C`continue\*(C'\fR blocks. For example, print.Sp.Vb 5\&    if (...) {\&         ...\&    } else {\&         ...\&    }.Ve.Spinstead of.Sp.Vb 6\&    if (...) {\&         ...\&    }\&    else {\&         ...\&    }.Ve.SpThe default is not to cuddle..IP "\fBi\fR\fI\s-1NUMBER\s0\fR" 4.IX Item "iNUMBER"Indent lines by multiples of \fI\s-1NUMBER\s0\fR columns. The default is 4 columns..IP "\fBT\fR" 4.IX Item "T"Use tabs for each 8 columns of indent. The default is to use only spaces.For instance, if the style options are \fB\-si4T\fR, a line that's indented3 times will be preceded by one tab and four spaces; if the options were\&\fB\-si8T\fR, the same line would be preceded by three tabs..IP "\fBv\fR\fI\s-1STRING\s0\fR\fB.\fR" 4.IX Item "vSTRING."Print \fI\s-1STRING\s0\fR for the value of a constant that can't be determinedbecause it was optimized away (mnemonic: this happens when a constantis used in \fBv\fRoid context). The end of the string is marked by a period.The string should be a valid perl expression, generally a constant.Note that unless it's a number, it probably needs to be quoted, and ona command line quotes need to be protected from the shell. Someconventional values include 0, 1, 42, '', 'foo', and\&'Useless use of constant omitted' (which may need to be\&\fB\-sv\*(L"'Useless use of constant omitted'.\*(R"\fRor something similar depending on your shell). The default is '???'.

⌨️ 快捷键说明

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