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

📄 api.pod

📁 视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.
💻 POD
📖 第 1 页 / 共 4 页
字号:
behavior based on the current platform, you may only need to knowwhether you're running on Windows, Unix, MacOS, VMS, etc., and not thefine-grained value of Perl's C<$^O> variable.  The C<os_type()> methodwill return a string like C<Windows>, C<Unix>, C<MacOS>, C<VMS>, orwhatever is appropriate.  If you're running on an unknown platform, itwill return C<undef> - there shouldn't be many unknown platformsthough.=item is_vmsish()=item is_windowsish()=item is_unixish()Convenience functions that return a boolean value indicating whetherthis platform behaves respectively like VMS, Windows, or Unix.  Forarbitrary reasons other platforms don't get their own such functions,at least not yet.=item prefix_relpaths()=item prefix_relpaths($installdirs)=item prefix_relpaths($installdirs, $type)=item prefix_relpaths($installdirs, $type => $path)[version 0.28]Set or retrieve the relative paths that are appended to C<prefix> forany installable element.  This is useful if you want to set therelative install path for custom build elements.With no argument, it returns a reference to a hash containing allelements and their respective values as defined by the currentC<installdirs> setting.With a single argument, it returns a reference to a hash containingall elements and their respective values as defined byC<$installdirs>.The hash returned by the above calls should not be modified directly;use the three-argument below form to change values.The two argument form returns the value associated with theelement C<$type>.The multi-argument form allows you to set the paths for element types.C<$value> must be a relative path using unix-like paths.  (A series ofdirectories seperated by slashes.  Eg 'foo/bar'.)  The return value is alocalized path based on C<$value>.Assigning the value C<undef> to an element causes it to be removed.=item prepare_metadata()[version 0.28]This method is provided for authors to override to customize thefields of F<META.yml>.  It is passed a YAML::Node node object which canbe modified as desired and then returned.  E.g.  package My::Builder;  use base 'Module::Build';  sub prepare_metadata {    my $self = shift;    my $node = $self->SUPER::prepare_metadata( shift );    $node->{custom_field} = 'foo';    return $node;  }=item prereq_failures()[version 0.11]Returns a data structure containing information about any failedprerequisites (of any of the types described above), or C<undef> ifall prerequisites are met.The data structure returned is a hash reference.  The top level keysare the type of prerequisite failed, one of "requires","build_requires", "conflicts", or "recommends".  The associated valuesare hash references whose keys are the names of required (orconflicting) modules.  The associated values of those are hashreferences indicating some information about the failure.  For example:  {   have => '0.42',   need => '0.59',   message => 'Version 0.42 is installed, but we need version 0.59',  }or  {   have => '<none>',   need => '0.59',   message => 'Prerequisite Foo isn't installed',  }This hash has the same structure as the hash returned by theC<check_installed_status()> method, except that in the case of"conflicts" dependencies we change the "need" key to "conflicts" andconstruct a proper message.Examples:  # Check a required dependency on Foo::Bar  if ( $build->prereq_failures->{requires}{Foo::Bar} ) { ...  # Check whether there were any failures  if ( $build->prereq_failures ) { ...  # Show messages for all failures  my $failures = $build->prereq_failures;  while (my ($type, $list) = each %$failures) {    while (my ($name, $hash) = each %$list) {      print "Failure for $name: $hash->{message}\n";    }  }=item prereq_report()[version 0.28]Returns a human-readable (table-form) string showing allprerequisites, the versions required, and the versions actuallyinstalled.  This can be useful for reviewing the configuration of yoursystem prior to a build, or when compiling data to send for a bugreport.  The C<prereq_report> action is just a thin wrapper around theC<prereq_report()> method.=item prompt($message, $default)[version 0.12]Asks the user a question and returns their response as a string.  Thefirst argument specifies the message to display to the user (forexample, C<"Where do you keep your money?">).  The second argument,which is optional, specifies a default answer (for example,C<"wallet">).  The user will be asked the question once.If C<prompt()> detects that it is not running interactively and thereis nothing on STDIN or if the PERL_MM_USE_DEFAULT environment variableis set to true, the $default will be used without prompting.To prevent automated processes from blocking, the user must either setPERL_MM_USE_DEFAULT or attach something to STDIN (this can be apipe/file containing a scripted set of answers or /dev/null.)If no $default is provided an empty string will be used instead.  Innon-interactive mode, the absence of $default is an error (thoughexplicitly passing C<undef()> as the default is valid as of 0.27.)This method may be called as a class or object method.=item recommends()[version 0.21]Returns a hash reference indicating the C<recommends> prerequisitesthat were passed to the C<new()> method.=item requires()[version 0.21]Returns a hash reference indicating the C<requires> prerequisites thatwere passed to the C<new()> method.=item rscan_dir($dir, $pattern)[version 0.28]Uses C<File::Find> to traverse the directory C<$dir>, returning areference to an array of entries matching C<$pattern>.  C<$pattern>may either be a regular expression (using C<qr//> or just a plainstring), or a reference to a subroutine that will return true forwanted entries.  If C<$pattern> is not given, all entries will bereturned.Examples: # All the *.pm files in lib/ $m->rscan_dir('lib', qr/\.pm$/) # All the files in blib/ that aren't *.html files $m->rscan_dir('blib', sub {-f $_ and not /\.html$/}); # All the files in t/ $m->rscan_dir('t');=item runtime_params()=item runtime_params($key)[version 0.28]The C<runtime_params()> method stores the values passed on the command linefor valid properties (that is, any command line options for whichC<valid_property()> returns a true value).  The value on the command line mayoverride the default value for a property, as well as any value specified in acall to C<new()>.  This allows you to programmatically tell if C<perl Build.PL>or any execution of C<./Build> had command line options specified thatoverride valid properties.The C<runtime_params()> method is essentally a glorified read-only hash.  Withno arguments, C<runtime_params()> returns the entire hash of propertiesspecified on the command line.  With one argument, C<runtime_params($key)>returns the value associated with the given key.The lifetime of the C<runtime_params> data is for "a build" - that is, theC<runtime_params> hash is created when C<perl Build.PL> is run (or when theC<new()> method is called, if the Module::Build Perl API is being used insteadof called from a shell), and lasts until C<perl Build.PL> is run again or theC<clean> action is run.=item script_files()[version 0.18]Returns a hash reference whose keys are the perl script files to beinstalled, if any.  This corresponds to the C<script_files> parameter to theC<new()> method.  With an optional argument, this parameter may be setdynamically.For backward compatibility, the C<scripts()> method does exactly thesame thing as C<script_files()>.  C<scripts()> is deprecated, but itwill stay around for several versions to give people time totransition.=item up_to_date($source_file, $derived_file)=item up_to_date(\@source_files, \@derived_files)[version 0.20]This method can be used to compare a set of source files to a set ofderived files.  If any of the source files are newer than any of thederived files, it returns false.  Additionally, if any of the derivedfiles do not exist, it returns false.  Otherwise it returns true.The arguments may be either a scalar or an array reference of filenames.=item y_n($message, $default)[version 0.12]Asks the user a yes/no question using C<prompt()> and returns true orfalse accordingly.  The user will be asked the question repeatedlyuntil they give an answer that looks like "yes" or "no".The first argument specifies the message to display to the user (forexample, C<"Shall I invest your money for you?">), and the secondargument specifies the default answer (for example, C<"y">).Note that the default is specified as a string like C<"y"> or C<"n">,and the return value is a Perl boolean value like 1 or 0.  I thoughtabout this for a while and this seemed like the most useful way to doit.This method may be called as a class or object method.=back=head2 Autogenerated AccessorsIn addition to the aforementioned methods, there are also some get/setaccessor methods for the following properties:=over 4=item PL_files()=item allow_mb_mismatch()=item autosplit()=item base_dir()=item bindoc_dirs()=item blib()=item build_bat()=item build_class()=item build_elements()=item build_requires()=item build_script()=item c_source()=item config_dir()=item configure_requires()=item conflicts()=item create_makefile_pl()=item create_packlist()=item create_readme()=item debugger()=item destdir()=item get_options()=item html_css()=item include_dirs()=item install_base()=item install_sets()=item installdirs()=item libdoc_dirs()=item license()=item magic_number()=item mb_version()=item meta_add()=item meta_merge()=item metafile()=item module_name()=item orig_dir()=item original_prefix()=item perl()=item pm_files()=item pod_files()=item pollute()=item prefix()=item prereq_action_types()=item quiet()=item recommends()=item recurse_into()=item recursive_test_files()=item requires()=item scripts()=item use_rcfile()=item verbose()=item xs_files()=back=head1 MODULE METADATAIf you would like to add other useful metadata, C<Module::Build>supports this with the C<meta_add> and C<meta_merge> arguments toL</new>. The authoritative list of supported metadata can be found atL<http://module-build.sourceforge.net/META-spec-current.html>, but forconvenience - here are a few of the more useful ones:=over 4=item keywordsFor describing the distribution using keyword (or "tags") in order tomake CPAN.org indexing and search more efficient and useful.See L<http://module-build.sourceforge.net/META-spec-current.html#keywords>.=item resourcesA list of additional resources available for users of thedistribution. This can include links to a homepage on the web, abugtracker, the repository location, a even subscription page for thedistribution mailing list.See L<http://module-build.sourceforge.net/META-spec-current.html#resources>.=back=head1 AUTHORKen Williams <kwilliams@cpan.org>=head1 COPYRIGHTCopyright (c) 2001-2006 Ken Williams.  All rights reserved.This library is free software; you can redistribute it and/ormodify it under the same terms as Perl itself.=head1 SEE ALSOperl(1), L<Module::Build>(3), L<Module::Build::Authoring>(3),L<Module::Build::Cookbook>(3), L<ExtUtils::MakeMaker>(3), L<YAML>(3)F<META.yml> Specification:L<http://module-build.sourceforge.net/META-spec-current.html>=cut

⌨️ 快捷键说明

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