OpenBSD::Search man page on OpenBSD

Man page or keyword search:  
man Server   11362 pages
apropos Keyword Search (all sections)
Output format
OpenBSD logo
[printable version]

OpenBSD::Search(3p)    Perl Programmers Reference Guide	   OpenBSD::Search(3p)

NAME
       OpenBSD::Search - package names matching framework

SYNOPSIS
	  use OpenBSD::Search;

	  # pkgspec objects
	  my $search_object = OpenBSD::Search::PkgSpec->new($pattern);
	  my $filter_object = OpenBSD::Search::Filter->keep_most_recent;

	  # need repository to apply to

	  use OpenBSD::PackageRepository::Installed;

	  my $inst = OpenBSD::PackageRepository::Installed->new;

	  my $list_ref = $inst->match_locations($search_object, $filter_object);

DESCRIPTION
       "OpenBSD::Search" provides a search infrastructure for
       "OpenBSD::PackageRepository" objects.

       A given repository can be searched for existing packages using
       "$repo->match_locations($search1, $filter1, ...);"

       It returns a reference to a list of matching "OpenBSD::PackageLocation"
       objects.

       A repository list can be searched in a similar way: the search proceeds
       through each repository in the list, and stops as soon as it finds a
       non-empty match (similar to "ld -L" rules).

       The first search object $search is used to find the basic set of
       matching packages, and further objects are used to weed out unwanted
       elements from the list.

       Complex searches must be built as lists of filter objects, in order to
       preserve RepositoryList semantics, and ensure the correct non-empty
       first match is returned.

       The infrastructure provides the following objects:

       OpenBSD::Search::PkgSpec
	   "OpenBSD::PkgSpec" filters.

       OpenBSD::Search::Stem
	   finds all packages with a given stem.

       OpenBSD::Search::PartialStem
	   finds all packages including a partial stem.

       OpenBSD::Search::Filter
	   filters package list through further tests.

perl v5.12.2							 June 30, 2010
[top]

List of man pages available for OpenBSD

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net