App-Open

 view release on metacpan or  search on metacpan

lib/App/Open/Using.pm  view on Meta::CPAN

started, in the contrib/ directory of the distribution there are a few
configurations that should work with most systems.

App::Open requires a configuration file ($HOME/.openrc) to define the backends
you want to use.  These backends may have further requirements, which should be
located in their individual documentation.

Because the author is unbelievably lazy, YAML is used for the configuration,
with a fixed data structure.

A basic, one-backend configuration looks something like this:

 ----
 backend:
    "BackendName":
        - "backend"
        - "specific"
        - "arguments"

For example, the MailCap backend:

lib/App/Open/Using.pm  view on Meta::CPAN


Backends are order-dependent and the first one to return a program that matches
your filename or URL will be executed.

You can use this scheme with multiple backends, but resolution order
cannot be guaranteed. The next section goes into setting up multiple
backends with a guaranteed resolution order.

=head1 MULTIPLE BACKENDS

An order-dependent configuration looks something like this:

    ---
    backend:
        - name: "YAML"
          args:
            - "t/resource/backends/yaml/def1.yaml"
        - name: "MailCap"

In this configuration, the "YAML" backend will be used first (using
the "def1.yaml" as the mapping), and if nothing is found, the



( run in 0.716 second using v1.01-cache-2.11-cpan-64827b87656 )