| Path-Resolver documentation | view source | Contained in the Path-Resolver distribution. |
Path::Resolver::Resolver::Mux::Ordered - multiplex resolvers by checking them in order
version 3.100451
my $resolver = Path::Resolver::Resolver::Mux::Ordered->new({
resolvers => [
$resolver_1,
$resolver_2,
...
],
});
my $simple_entity = $resolver->entity_at('foo/bar.txt');
This resolver looks in each of its resolvers in order and returns the result of the first of its sub-resolvers to find the named entity. If no entity is found, it returns false as usual.
The default native type of this resolver is Any, meaning that is is much more
lax than other resolvers. A native_type can be specified while creating the
resolver.
This is an array of other resolvers. When asked for content, the Mux::Ordered resolver will check each resolver in this array and return the first found content, or false if none finds any content.
This method will add a resolver to the beginning of the list of consulted resolvers.
This method will add a resolver to the end of the list of consulted resolvers.
Ricardo Signes <rjbs@cpan.org>
This software is copyright (c) 2010 by Ricardo Signes.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
| Path-Resolver documentation | view source | Contained in the Path-Resolver distribution. |