File::MimeInfo::Applications

File::MimeInfo::Applications is a Perl module that can find programs to open a file by mimetype.
Download

File::MimeInfo::Applications Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Jaap Karssenberg
  • Publisher web site:
  • http://search.cpan.org/~pardus/

File::MimeInfo::Applications Tags


File::MimeInfo::Applications Description

File::MimeInfo::Applications is a Perl module that can find programs to open a file by mimetype. File::MimeInfo::Applications is a Perl module that can find programs to open a file by mimetype.SYNOPSIS use File::MimeInfo::Magic; use File::MimeInfo::Applications; my $file = '/foo/bar'; my $mimetype = mimetype($file) || die "Could not find mimetype for $filen"; my ($default, @other) = mime_applications($mimetype); if (defined $default) { $default->system($file) } else { # prompt user with choice from @others # ... }This module tries to find applications that can open files with a certain mimetype. This is done in the way suggested by the freedesktop Desktop Entry specification. This module is intended to be compatible with file managers and other applications that implement this specification.This module depends on File::DesktopEntry being installed.To use this module effectively you need to have the desktop-file-utils package from freedesktop and run update-desktop-database after installing new .desktop files. See http://freedesktop.org/wiki/Software_2fdesktop_2dfile_2dutils.At the moment of writing this module is compatible with the way nautilus (Gnome) handles mimetypes and with thunar. I understand KDE is still working on implementing the freedesktop mime specifications but will follow. At the very least all perl applications using this module are using the same defaults. Requirements: · Perl


File::MimeInfo::Applications Related Software