.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .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 .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' '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 >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "CPANPLUS::Internals::Search 3" .TH CPANPLUS::Internals::Search 3 2023-07-25 "perl v5.38.0" "User Contributed Perl Documentation" .\" 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 CPANPLUS::Internals::Search \- internals for searching for modules .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 4 \& my $aref = $cpan\->_search_module_tree( \& type => \*(Aqpackage\*(Aq, \& allow => [qr/DBI/], \& ); \& \& my $aref = $cpan\->_search_author_tree( \& type => \*(Aqcpanid\*(Aq, \& data => \e@old_results, \& verbose => 1, \& allow => [qw|KANE AUTRIJUS|], \& ); \& \& my $aref = $cpan\->_all_installed( ); .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" The functions in this module are designed to find module(objects) based on certain criteria and return them. .SH METHODS .IX Header "METHODS" .SS "_search_module_tree( type => TYPE, allow => \e@regexes, [data => \e@previous_results ] )" .IX Subsection "_search_module_tree( type => TYPE, allow => @regexes, [data => @previous_results ] )" Searches the moduletree for module objects matching the criteria you specify. Returns an array ref of module objects on success, and false on failure. .PP It takes the following arguments: .IP type 4 .IX Item "type" This can be any of the accessors for the \f(CW\*(C`CPANPLUS::Module\*(C'\fR objects. This is a required argument. .IP allow 4 .IX Item "allow" A set of rules, or more precisely, a list of regexes (via \f(CW\*(C`qr//\*(C'\fR or plain strings), that the \f(CW\*(C`type\*(C'\fR must adhere too. You can specify as many as you like, and it will be treated as an \f(CW\*(C`OR\*(C'\fR search. For an \f(CW\*(C`AND\*(C'\fR search, see the \f(CW\*(C`data\*(C'\fR argument. .Sp This is a required argument. .IP data 4 .IX Item "data" An arrayref of previous search results. This is the way to do an \f(CW\*(C`AND\*(C'\fR search \-\- \f(CW\*(C`_search_module_tree\*(C'\fR will only search the module objects specified in \f(CW\*(C`data\*(C'\fR if provided, rather than the moduletree itself. .SS "_search_author_tree( type => TYPE, allow => \e@regexex, [data => \e@previous_results ] )" .IX Subsection "_search_author_tree( type => TYPE, allow => @regexex, [data => @previous_results ] )" Searches the authortree for author objects matching the criteria you specify. Returns an array ref of author objects on success, and false on failure. .PP It takes the following arguments: .IP type 4 .IX Item "type" This can be any of the accessors for the \f(CW\*(C`CPANPLUS::Module::Author\*(C'\fR objects. This is a required argument. .IP allow 4 .IX Item "allow" A set of rules, or more precisely, a list of regexes (via \f(CW\*(C`qr//\*(C'\fR or plain strings), that the \f(CW\*(C`type\*(C'\fR must adhere too. You can specify as many as you like, and it will be treated as an \f(CW\*(C`OR\*(C'\fR search. For an \f(CW\*(C`AND\*(C'\fR search, see the \f(CW\*(C`data\*(C'\fR argument. .Sp This is a required argument. .IP data 4 .IX Item "data" An arrayref of previous search results. This is the way to do an \f(CW\*(C`and\*(C'\fR search \-\- \f(CW\*(C`_search_author_tree\*(C'\fR will only search the author objects specified in \f(CW\*(C`data\*(C'\fR if provided, rather than the authortree itself. .SS \fB_all_installed()\fP .IX Subsection "_all_installed()" This function returns an array ref of module objects of modules that are installed on this system.