cpanplus::internals::source.3

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

3
432
字号
.IX Item "update_source"Flag to force updating of sourcefiles regardless..IP "verbose" 4.IX Item "verbose"Boolean to indicate whether to be verbose or not..PPReturns a boolean value indicating whether the current files are upto date or not..ie n .Sh "$cb\fP\->_update_source( name => \f(CW$name\fP, [path => \f(CW$path, verbose => \s-1BOOL\s0] )".el .Sh "\f(CW$cb\fP\->_update_source( name => \f(CW$name\fP, [path => \f(CW$path\fP, verbose => \s-1BOOL\s0] )".IX Subsection "$cb->_update_source( name => $name, [path => $path, verbose => BOOL] )"This method does the actual fetching of source files..PPIt takes the following arguments:.IP "name" 4.IX Item "name"The internal shortcut name for the source file (used for configlookups)..IP "path" 4.IX Item "path"The full path where to write the files..IP "verbose" 4.IX Item "verbose"Boolean to indicate whether to be verbose or not..PPReturns a boolean to indicate success..ie n .Sh "$cb\fP\->_build_trees( uptodate => \s-1BOOL\s0, [use_stored => \s-1BOOL\s0, path => \f(CW$path, verbose => \s-1BOOL\s0] )".el .Sh "\f(CW$cb\fP\->_build_trees( uptodate => \s-1BOOL\s0, [use_stored => \s-1BOOL\s0, path => \f(CW$path\fP, verbose => \s-1BOOL\s0] )".IX Subsection "$cb->_build_trees( uptodate => BOOL, [use_stored => BOOL, path => $path, verbose => BOOL] )"This method rebuilds the author\- and module-trees from source..PPIt takes the following arguments:.IP "uptodate" 4.IX Item "uptodate"Indicates whether any on disk caches are still ok to use..IP "path" 4.IX Item "path"The absolute path to the directory holding the source files..IP "verbose" 4.IX Item "verbose"A boolean flag indicating whether or not to be verbose..IP "use_stored" 4.IX Item "use_stored"A boolean flag indicating whether or not it is ok to use previouslystored trees. Defaults to true..PPReturns a boolean indicating success..ie n .Sh "$cb\fP\->_\|_retrieve_source(name => \f(CW$name\fP, [path => \f(CW$path, uptodate => \s-1BOOL\s0, verbose => \s-1BOOL\s0])".el .Sh "\f(CW$cb\fP\->_\|_retrieve_source(name => \f(CW$name\fP, [path => \f(CW$path\fP, uptodate => \s-1BOOL\s0, verbose => \s-1BOOL\s0])".IX Subsection "$cb->__retrieve_source(name => $name, [path => $path, uptodate => BOOL, verbose => BOOL])"This method retrieves a \fIstorable\fRd tree identified by \f(CW$name\fR..PPIt takes the following arguments:.IP "name" 4.IX Item "name"The internal name for the source file to retrieve..IP "uptodate" 4.IX Item "uptodate"A flag indicating whether the file-cache is up-to-date or not..IP "path" 4.IX Item "path"The absolute path to the directory holding the source files..IP "verbose" 4.IX Item "verbose"A boolean flag indicating whether or not to be verbose..PPWill get information from the config file by default..PPReturns a tree on success, false on failure..ie n .Sh "$cb\fP\->_save_source([verbose => \s-1BOOL\s0, path => \f(CW$path])".el .Sh "\f(CW$cb\fP\->_save_source([verbose => \s-1BOOL\s0, path => \f(CW$path\fP])".IX Subsection "$cb->_save_source([verbose => BOOL, path => $path])"This method saves all the parsed trees in \fIstorable\fRd format if\&\f(CW\*(C`Storable\*(C'\fR is available..PPIt takes the following arguments:.IP "path" 4.IX Item "path"The absolute path to the directory holding the source files..IP "verbose" 4.IX Item "verbose"A boolean flag indicating whether or not to be verbose..PPWill get information from the config file by default..PPReturns true on success, false on failure..ie n .Sh "$cb\fP\->_\|_create_author_tree([path => \f(CW$path, uptodate => \s-1BOOL\s0, verbose => \s-1BOOL\s0])".el .Sh "\f(CW$cb\fP\->_\|_create_author_tree([path => \f(CW$path\fP, uptodate => \s-1BOOL\s0, verbose => \s-1BOOL\s0])".IX Subsection "$cb->__create_author_tree([path => $path, uptodate => BOOL, verbose => BOOL])"This method opens a source files and parses its contents into asearchable author-tree or restores a file-cached version of aprevious parse, if the sources are uptodate and the file-cache exists..PPIt takes the following arguments:.IP "uptodate" 4.IX Item "uptodate"A flag indicating whether the file-cache is uptodate or not..IP "path" 4.IX Item "path"The absolute path to the directory holding the source files..IP "verbose" 4.IX Item "verbose"A boolean flag indicating whether or not to be verbose..PPWill get information from the config file by default..PPReturns a tree on success, false on failure..ie n .Sh "$cb\fP\->_create_mod_tree([path => \f(CW$path, uptodate => \s-1BOOL\s0, verbose => \s-1BOOL\s0])".el .Sh "\f(CW$cb\fP\->_create_mod_tree([path => \f(CW$path\fP, uptodate => \s-1BOOL\s0, verbose => \s-1BOOL\s0])".IX Subsection "$cb->_create_mod_tree([path => $path, uptodate => BOOL, verbose => BOOL])"This method opens a source files and parses its contents into asearchable module-tree or restores a file-cached version of aprevious parse, if the sources are uptodate and the file-cache exists..PPIt takes the following arguments:.IP "uptodate" 4.IX Item "uptodate"A flag indicating whether the file-cache is up-to-date or not..IP "path" 4.IX Item "path"The absolute path to the directory holding the source files..IP "verbose" 4.IX Item "verbose"A boolean flag indicating whether or not to be verbose..PPWill get information from the config file by default..PPReturns a tree on success, false on failure..ie n .Sh "$cb\fP\->_\|_create_dslip_tree([path => \f(CW$path, uptodate => \s-1BOOL\s0, verbose => \s-1BOOL\s0])".el .Sh "\f(CW$cb\fP\->_\|_create_dslip_tree([path => \f(CW$path\fP, uptodate => \s-1BOOL\s0, verbose => \s-1BOOL\s0])".IX Subsection "$cb->__create_dslip_tree([path => $path, uptodate => BOOL, verbose => BOOL])"This method opens a source files and parses its contents into asearchable dslip-tree or restores a file-cached version of aprevious parse, if the sources are uptodate and the file-cache exists..PPIt takes the following arguments:.IP "uptodate" 4.IX Item "uptodate"A flag indicating whether the file-cache is uptodate or not..IP "path" 4.IX Item "path"The absolute path to the directory holding the source files..IP "verbose" 4.IX Item "verbose"A boolean flag indicating whether or not to be verbose..PPWill get information from the config file by default..PPReturns a tree on success, false on failure..ie n .Sh "$cb\->_dslip_defs ()".el .Sh "\f(CW$cb\fP\->_dslip_defs ()".IX Subsection "$cb->_dslip_defs ()"This function returns the definition structure (\s-1ARRAYREF\s0) of thedslip tree..ie n .Sh "$file\fP = \f(CW$cb\->_add_custom_module_source( uri => \s-1URI\s0, [verbose => \s-1BOOL\s0] );".el .Sh "\f(CW$file\fP = \f(CW$cb\fP\->_add_custom_module_source( uri => \s-1URI\s0, [verbose => \s-1BOOL\s0] );".IX Subsection "$file = $cb->_add_custom_module_source( uri => URI, [verbose => BOOL] );"Adds a custom source index and updates it based on the provided \s-1URI\s0..PPReturns the full path to the index file on success or false on failure..ie n .Sh "$index\fP = \f(CW$cb\fP\->_\|_custom_module_source_index_file( uri => \f(CW$uri );".el .Sh "\f(CW$index\fP = \f(CW$cb\fP\->_\|_custom_module_source_index_file( uri => \f(CW$uri\fP );".IX Subsection "$index = $cb->__custom_module_source_index_file( uri => $uri );"Returns the full path to the encoded index file for \f(CW$uri\fR, as used byall \f(CW\*(C`custom module source\*(C'\fR routines..ie n .Sh "$file\fP = \f(CW$cb\->_remove_custom_module_source( uri => \s-1URI\s0, [verbose => \s-1BOOL\s0] );".el .Sh "\f(CW$file\fP = \f(CW$cb\fP\->_remove_custom_module_source( uri => \s-1URI\s0, [verbose => \s-1BOOL\s0] );".IX Subsection "$file = $cb->_remove_custom_module_source( uri => URI, [verbose => BOOL] );"Removes a custom index file based on the \s-1URI\s0 provided..PPReturns the full path to the index file on success or false on failure..ie n .Sh "%files\fP = \f(CW$cb\->_\|_list_custom_module_sources".el .Sh "\f(CW%files\fP = \f(CW$cb\fP\->_\|_list_custom_module_sources".IX Subsection "%files = $cb->__list_custom_module_sources"This method scans the 'custom\-sources' directory in your base directoryfor additional sources to include in your module tree..PPReturns a list of key value pairs as follows:.PP.Vb 1\&  /full/path/to/source/file%3Fencoded => http://decoded/mirror/path.Ve.ie n .Sh "$bool\fP = \f(CW$cb\->_\|_update_custom_module_sources( [verbose => \s-1BOOL\s0] );".el .Sh "\f(CW$bool\fP = \f(CW$cb\fP\->_\|_update_custom_module_sources( [verbose => \s-1BOOL\s0] );".IX Subsection "$bool = $cb->__update_custom_module_sources( [verbose => BOOL] );"Attempts to update all the index files to your custom module sources..PPIf the index is missing, and it's a \f(CW\*(C`file://\*(C'\fR uri, it will generatea new local index for you..PPReturn true on success, false on failure..ie n .Sh "$ok\fP = \f(CW$cb\->_\|_update_custom_module_source".el .Sh "\f(CW$ok\fP = \f(CW$cb\fP\->_\|_update_custom_module_source".IX Subsection "$ok = $cb->__update_custom_module_source"Attempts to update all the index files to your custom module sources..PPIf the index is missing, and it's a \f(CW\*(C`file://\*(C'\fR uri, it will generatea new local index for you..PPReturn true on success, false on failure..ie n .Sh "$bool\fP = \f(CW$cb\->_\|_write_custom_module_index( path => /path/to/packages, [to => /path/to/index/file, verbose => \s-1BOOL\s0] )".el .Sh "\f(CW$bool\fP = \f(CW$cb\fP\->_\|_write_custom_module_index( path => /path/to/packages, [to => /path/to/index/file, verbose => \s-1BOOL\s0] )".IX Subsection "$bool = $cb->__write_custom_module_index( path => /path/to/packages, [to => /path/to/index/file, verbose => BOOL] )"Scans the \f(CW\*(C`path\*(C'\fR you provided for packages and writes an index with all the available packages to \f(CW\*(C`$path/packages.txt\*(C'\fR. If you'd like the indexto be written to a different file, provide the \f(CW\*(C`to\*(C'\fR argument..PPReturns true on success and false on failure..ie n .Sh "$bool\fP = \f(CW$cb\->_\|_create_custom_module_entries( [verbose => \s-1BOOL\s0] )".el .Sh "\f(CW$bool\fP = \f(CW$cb\fP\->_\|_create_custom_module_entries( [verbose => \s-1BOOL\s0] )".IX Subsection "$bool = $cb->__create_custom_module_entries( [verbose => BOOL] )"Creates entries in the module tree based upon the files as returnedby \f(CW\*(C`_\|_list_custom_module_sources\*(C'\fR..PPReturns true on success, false on failure.

⌨️ 快捷键说明

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