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

📄 ppphdoc

📁 source of perl for linux application,
💻
字号:
####################################################################################  $Revision: 30 $##  $Author: mhx $##  $Date: 2007/05/22 21:26:46 +0200 $######################################################################################  Version 3.x, Copyright (C) 2004-2007, Marcus Holland-Moritz.##  Version 2.x, Copyright (C) 2001, Paul Marquess.##  Version 1.x, Copyright (C) 1999, Kenneth Albanowski.####  This program is free software; you can redistribute it and/or##  modify it under the same terms as Perl itself.##################################################################################=provides=dontwarnNEED_functionNEED_function_GLOBALNEED_variableNEED_variable_GLOBALDPPP_NAMESPACE=implementation=pod=head1 NAMEppport.h - Perl/Pollution/Portability version __VERSION__=head1 SYNOPSIS  perl ppport.h [options] [source files]  Searches current directory for files if no [source files] are given  --help                      show short help  --version                   show version  --patch=file                write one patch file with changes  --copy=suffix               write changed copies with suffix  --diff=program              use diff program and options  --compat-version=version    provide compatibility with Perl version  --cplusplus                 accept C++ comments  --quiet                     don't output anything except fatal errors  --nodiag                    don't show diagnostics  --nohints                   don't show hints  --nochanges                 don't suggest changes  --nofilter                  don't filter input files  --strip                     strip all script and doc functionality from                              ppport.h  --list-provided             list provided API  --list-unsupported          list unsupported API  --api-info=name             show Perl API portability information=head1 COMPATIBILITYThis version of F<ppport.h> is designed to support operation with Perlinstallations back to __MIN_PERL__, and has been tested up to __MAX_PERL__.=head1 OPTIONS=head2 --helpDisplay a brief usage summary.=head2 --versionDisplay the version of F<ppport.h>.=head2 --patch=I<file>If this option is given, a single patch file will be created ifany changes are suggested. This requires a working diff programto be installed on your system.=head2 --copy=I<suffix>If this option is given, a copy of each file will be saved withthe given suffix that contains the suggested changes. This doesnot require any external programs. Note that this does notautomagially add a dot between the original filename and thesuffix. If you want the dot, you have to include it in the optionargument.If neither C<--patch> or C<--copy> are given, the default is tosimply print the diffs for each file. This requires eitherC<Text::Diff> or a C<diff> program to be installed.=head2 --diff=I<program>Manually set the diff program and options to use. The defaultis to use C<Text::Diff>, when installed, and output unifiedcontext diffs.=head2 --compat-version=I<version>Tell F<ppport.h> to check for compatibility with the givenPerl version. The default is to check for compatibility with Perlversion __MIN_PERL__. You can use this option to reduce the outputof F<ppport.h> if you intend to be backward compatible onlydown to a certain Perl version.=head2 --cplusplusUsually, F<ppport.h> will detect C++ style comments andreplace them with C style comments for portability reasons.Using this option instructs F<ppport.h> to leave C++comments untouched.=head2 --quietBe quiet. Don't print anything except fatal errors.=head2 --nodiagDon't output any diagnostic messages. Only portabilityalerts will be printed.=head2 --nohintsDon't output any hints. Hints often contain useful portabilitynotes. Warnings will still be displayed.=head2 --nochangesDon't suggest any changes. Only give diagnostic output and hintsunless these are also deactivated.=head2 --nofilterDon't filter the list of input files. By default, files not lookinglike source code (i.e. not *.xs, *.c, *.cc, *.cpp or *.h) are skipped.=head2 --stripStrip all script and documentation functionality from F<ppport.h>.This reduces the size of F<ppport.h> dramatically and may be usefulif you want to include F<ppport.h> in smaller modules withoutincreasing their distribution size too much.The stripped F<ppport.h> will have a C<--unstrip> option that allowsyou to undo the stripping, but only if an appropriate C<Devel::PPPort>module is installed.=head2 --list-providedLists the API elements for which compatibility is provided byF<ppport.h>. Also lists if it must be explicitly requested,if it has dependencies, and if there are hints or warnings for it.=head2 --list-unsupportedLists the API elements that are known not to be supported byF<ppport.h> and below which version of Perl they probablywon't be available or work.=head2 --api-info=I<name>Show portability information for API elements matching I<name>.If I<name> is surrounded by slashes, it is interpreted as a regularexpression.=head1 DESCRIPTIONIn order for a Perl extension (XS) module to be as portable as possibleacross differing versions of Perl itself, certain steps need to be taken.=over 4=item *Including this header is the first major one. This alone will give youaccess to a large part of the Perl API that hasn't been available inearlier Perl releases. Use    perl ppport.h --list-providedto see which API elements are provided by ppport.h.=item *You should avoid using deprecated parts of the API. For example, usingglobal Perl variables without the C<PL_> prefix is deprecated. Also,some API functions used to have a C<perl_> prefix. Using this form isalso deprecated. You can safely use the supported API, as F<ppport.h>will provide wrappers for older Perl versions.=item *If you use one of a few functions or variables that were not present inearlier versions of Perl, and that can't be provided using a macro, youhave to explicitly request support for these functions by adding one ormore C<#define>s in your source code before the inclusion of F<ppport.h>.These functions or variables will be marked C<explicit> in the list shownby C<--list-provided>.Depending on whether you module has a single or multiple files thatuse such functions or variables, you want either C<static> or globalvariants.For a C<static> function or variable (used only in a single sourcefile), use:    #define NEED_function    #define NEED_variableFor a global function or variable (used in multiple source files),use:    #define NEED_function_GLOBAL    #define NEED_variable_GLOBALNote that you mustn't have more than one global request for thesame function or variable in your project.    __EXPLICIT_API__To avoid namespace conflicts, you can change the namespace of theexplicitly exported functions / variables using the C<DPPP_NAMESPACE>macro. Just C<#define> the macro before including C<ppport.h>:    #define DPPP_NAMESPACE MyOwnNamespace_    #include "ppport.h"The default namespace is C<DPPP_>.=backThe good thing is that most of the above can be checked by runningF<ppport.h> on your source code. See the next section fordetails.=head1 EXAMPLESTo verify whether F<ppport.h> is needed for your module, whether youshould make any changes to your code, and whether any special definesshould be used, F<ppport.h> can be run as a Perl script to check yoursource code. Simply say:    perl ppport.hThe result will usually be a list of patches suggesting changesthat should at least be acceptable, if not necessarily the mostefficient solution, or a fix for all possible problems.If you know that your XS module uses features only available innewer Perl releases, if you're aware that it uses C++ comments,and if you want all suggestions as a single patch file, you coulduse something like this:    perl ppport.h --compat-version=5.6.0 --cplusplus --patch=test.diffIf you only want your code to be scanned without any suggestionsfor changes, use:    perl ppport.h --nochangesYou can specify a different C<diff> program or options, usingthe C<--diff> option:    perl ppport.h --diff='diff -C 10'This would output context diffs with 10 lines of context.If you want to create patched copies of your files instead, use:    perl ppport.h --copy=.newTo display portability information for the C<newSVpvn> function,use:    perl ppport.h --api-info=newSVpvnSince the argument to C<--api-info> can be a regular expression,you can use    perl ppport.h --api-info=/_nomg$/to display portability information for all C<_nomg> functions or    perl ppport.h --api-info=/./to display information for all known API elements.=head1 BUGSIf this version of F<ppport.h> is causing failure duringthe compilation of this module, please check if newer versionsof either this module or C<Devel::PPPort> are available on CPANbefore sending a bug report.If F<ppport.h> was generated using the latest version ofC<Devel::PPPort> and is causing failure of this module, pleasefile a bug report using the CPAN Request Tracker at L<http://rt.cpan.org/>.Please include the following information:=over 4=item 1.The complete output from running "perl -V"=item 2.This file.=item 3.The name and version of the module you were trying to build.=item 4.A full log of the build that failed.=item 5.Any other information that you think could be relevant.=backFor the latest version of this code, please get the C<Devel::PPPort>module from CPAN.=head1 COPYRIGHTVersion 3.x, Copyright (c) 2004-2007, Marcus Holland-Moritz.Version 2.x, Copyright (C) 2001, Paul Marquess.Version 1.x, Copyright (C) 1999, Kenneth Albanowski.This program is free software; you can redistribute it and/ormodify it under the same terms as Perl itself.=head1 SEE ALSOSee L<Devel::PPPort>.=cut

⌨️ 快捷键说明

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