CPAN::Common::Index::Mux::Ordered(3)

NAME
CPAN::Common::Index::Mux::Ordered - Consult indices in order and return the first result

VERSION
version 0.010

SYNOPSIS
    use CPAN::Common::Index::Mux::Ordered;
    use Data::Dumper;

    $index = CPAN::Common::Index::Mux::Ordered->assemble(
        MetaDB => {},
        Mirror => { mirror => "http://cpan.cpantesters.org" },
    );

DESCRIPTION
This module multiplexes multiple CPAN::Common::Index objects, returning results in order.

For exact match queries, the first result is returned. For search queries, results from each index object are concatenated.

ATTRIBUTES

  resolvers
    An array reference of CPAN::Common::Index::* objects

METHODS

  assemble
    $index = CPAN::Common::Index::Mux::Ordered->assemble(
        MetaDB => {},
        Mirror => { mirror => "http://www.cpan.org" },
    );

This class method provides a shorthand for constructing a multiplexer. The arguments must be pairs of subclass suffixes and arguments. For example, "MetaDB" means to use "CPAN::Common::Index::MetaDB". Empty arguments must be given as an empty hash reference.

AUTHOR
David Golden <dagolden@cpan.org>

COPYRIGHT AND LICENSE
This software is Copyright (c) 2013 by David Golden.

This is free software, licensed under:

  The Apache License, Version 2.0, January 2004