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

📄 simple.pod

📁 视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.
💻 POD
字号:
=head1 NAMEPod::Simple - framework for parsing Pod=head1 SYNOPSIS TODO=head1 DESCRIPTIONPod::Simple is a Perl library for parsing text in the Pod ("plain olddocumentation") markup language that is typically used for writingdocumentation for Perl and for Perl modules. The Pod format is explainedin the L<perlpod|perlpod> man page; the most common formatter is called"perldoc".Pod formatters can use Pod::Simple to parse Pod documents into producerenderings of them in plain ASCII, in HTML, or in any number of otherformats. Typically, such formatters will be subclasses of Pod::Simple,and so they will inherit its methods, like C<parse_file>.If you're reading this document just because you have a Pod-processingsubclass that you want to use, this document (plus the documentation forthe subclass) is probably all you'll need to read.If you're reading this document because you want to write a formattersubclass, continue reading this document, and then readL<Pod::Simple::Subclassing>, and then possibly even read L<perlpodspec>(some of which is for parser-writers, but much of which is notes toformatter-writers).=head1 MAIN METHODS=over=item C<< $parser = I<SomeClass>->new(); >>This returns a new parser object, where I<C<SomeClass>> is a subclassof Pod::Simple.=item C<< $parser->output_fh( *OUT ); >>This sets the filehandle that C<$parser>'s output will be written to.You can pass C<*STDOUT>, otherwise you should probably do somethinglike this:    my $outfile = "output.txt";    open TXTOUT, ">$outfile" or die "Can't write to $outfile: $!";    $parser->output_fh(*TXTOUT);...before you call one of the C<< $parser->parse_I<whatever> >> methods.=item C<< $parser->output_string( \$somestring ); >>This sets the string that C<$parser>'s output will be sent to,instead of any filehandle.=item C<< $parser->parse_file( I<$some_filename> ); >>=item C<< $parser->parse_file( *INPUT_FH ); >>This reads the Pod content of the file (or filehandle) that you specify,and processes it with that C<$parser> object, according to howeverC<$parser>'s class works, and according to whatever parser options youhave set up for this C<$parser> object.=item C<< $parser->parse_string_document( I<$all_content> ); >>This works just like C<parse_file> except that it reads the Podcontent not from a file, but from a string that you have alreadyin memory.=item C<< $parser->parse_lines( I<...@lines...>, undef ); >>This processes the lines in C<@lines> (where each list item must be adefined value, and must contain exactly one line of content -- so noitems like C<"foo\nbar"> are allowed).  The final C<undef> is used toindicate the end of document being parsed.The other C<parser_I<whatever>> methods are meant to be called only onceper C<$parser> object; but C<parse_lines> can be called as many times perC<$parser> object as you want, as long as the last call (and onlythe last call) ends with an C<undef> value.=item C<< $parser->content_seen >>This returns true only if there has been any real content seenfor this document.=item C<< I<SomeClass>->filter( I<$filename> ); >>=item C<< I<SomeClass>->filter( I<*INPUT_FH> ); >>=item C<< I<SomeClass>->filter( I<\$document_content> ); >>This is a shortcut method for creating a new parser object, setting theoutput handle to STDOUT, and then processing the specified file (orfilehandle, or in-memory document). This is handy for one-liners likethis:  perl -MPod::Simple::Text -e "Pod::Simple::Text->filter('thingy.pod')"=back=head1 SECONDARY METHODSSome of these methods might be of interest to general users, aswell as of interest to formatter-writers.Note that the general pattern here is that the accessor-methodsread the attribute's value with C<< $value = $parser->I<attribute> >>and set the attribute's value withC<< $parser->I<attribute>(I<newvalue>) >>.  For each accessor, I typicallyonly mention one syntax or another, based on which I think you are actuallymost likely to use.=over=item C<< $parser->no_whining( I<SOMEVALUE> ) >>If you set this attribute to a true value, you will suppress theparser's complaints about irregularities in the Pod coding. By default,this attribute's value is false, meaning that irregularities willbe reported.Note that turning this attribute to true won't suppress one or two kindsof complaints about rarely occurring unrecoverable errors.=item C<< $parser->no_errata_section( I<SOMEVALUE> ) >>If you set this attribute to a true value, you will stop the parser fromgenerating a "POD ERRORS" section at the end of the document. Bydefault, this attribute's value is false, meaning that an errata sectionwill be generated, as necessary.=item C<< $parser->complain_stderr( I<SOMEVALUE> ) >>If you set this attribute to a true value, it will send reports ofparsing errors to STDERR. By default, this attribute's value is false,meaning that no output is sent to STDERR.Note that errors can be noted in an errata section, or sent to STDERR,or both, or neither. So don't think that turning on C<complain_stderr>will turn off C<no_errata_section> or vice versa -- these areindependent attributes.=item C<< $parser->source_filename >>This returns the filename that this parser object was set to read from.=item C<< $parser->doc_has_started >>This returns true if C<$parser> has read from a source, and has seenPod content in it.=item C<< $parser->source_dead >>This returns true if C<$parser> has read from a source, and come to theend of that source.=back=head1 CAVEATSThis is just a beta release -- there are a good number of things stillleft to do.  Notably, support for EBCDIC platforms is still half-done,an untested.=head1 SEE ALSOL<Pod::Simple::Subclassing>L<perlpod|perlpod>L<perlpodspec|perlpodspec>L<Pod::Escapes|Pod::Escapes>L<perldoc>=head1 COPYRIGHT AND DISCLAIMERSCopyright (c) 2002 Sean M. Burke.  All rights reserved.This library is free software; you can redistribute it and/or modify itunder the same terms as Perl itself.This program is distributed in the hope that it will be useful, butwithout any warranty; without even the implied warranty ofmerchantability or fitness for a particular purpose.=head1 AUTHOROriginal author: Sean M. Burke C<sburke@cpan.org>Maintained by: Allison Randal C<allison@perl.org>=cut

⌨️ 快捷键说明

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