App::Open::Backend::MailCap: A backend for using the mailcap system to lookup programs.


Please read App::Open::Backend for information on how to use backends.


Read App::Open::Backend for what the interface provides, method descriptions here will only cover implementation.


Takes two args, the filename and a "take" argument that corresponds to the Mail::Cap constructor argument of the same name, specifying to take the first mailcap file it finds, or all of them. There is some decision made when either of these arguments is undef, see load_definitions() for more information.


Return the mailcap filename supplied to the constructor.


Return the 'take' argument supplied to the constructor.


Return the Mail::Cap object.


Return the Mime::Types object.


Load the mailcap definitions and construct Mail::Cap and Mime::Types objects. This method is called from the constructor; there is no reason to call it directly.

This method will generate defaults for the `take` argument depending on what is supplied to the constructor. Basically, if you omit both arguments it will swallow all mailcap files, if you provide a take argument it will use that. If you provide a filename it will just use that, and if you supply `ALL` as the take method and a filename, it will search that file first, then cascade to the rest of the files on the system.

It could be better.


Given an extension, it will locate the MIME type for that extension via the MIME::Types database, and locate the `view` mailcap entry for it, sanitizing it for templating later.


Always returns undef. AFAICT mailcap does not support URLs.


This file and all portions of the original package are (C) 2008 Erik Hollensbe. Please see the file COPYING in the package for more information.


Probably a lot of them. Report them to <> if you're feeling kind. Report them to CPAN RT if you'd prefer they never get seen.