File::MimeInfo::Rox man page on ElementaryOS

Man page or keyword search:  
man Server   4994 pages
apropos Keyword Search (all sections)
Output format
ElementaryOS logo
[printable version]

File::MimeInfo::Rox(3pUser Contributed Perl DocumentatFile::MimeInfo::Rox(3pm)

       File::MimeInfo::Rox - Open files by mimetype "Rox style"

	 use File::MimeInfo::Magic;
	 use File::MimeInfo::Rox qw/:magic/;

	 # open some file with the apropriate program

	 # more verbose version
	 my $mt = mimetype($somefile)
	     || die "Could not find mimetype for $somefile\n";
	 mime_system($somefile, $mt)
	     || die "No program to open $somefile available\n";

       This module tries to mimic the behaviour of the rox file browser
       <> when "opening" data files.  It determines the mime
       type and searches in rox's "Choices" directories for a program to
       handle that mimetype.

       See the rox documentation for an extensive discussion of this

       The methods "mime_exec" and "mime_system" are exported, if you use the
       export tag ":magic" you get the same methods but File::MimeInfo::Magic
       will be used for mimetype lookup.

       The environment variable "CHOICESPATH" is used when searching for rox's
       config dirs. It defaults to

       "mime_system($file, $mimetype, @_)"
	   Try to open $file with the appropriate program for files of it's
	   mimetype. You can use $mimetype to force the mimetype.  Also if you
	   already know the mimetype it saves a lot of time to just tell it.

	   If either the mimetype couldn't be determined or no appropriate
	   program could be found "undef" is returned.	If the actual system
	   fails an exception is raised.

	   All remaining arguments are passed on to the handler.

       "mime_exec($file, $mimetype, @_)"
	   Like "mime_system()" but uses exec instead of system, so it never
	   returns if successful.

	   Returns the list "($dir, $file)" for the suggested place to write
	   new script files (or symlinks) for mimetype $mimetype.  The
	   suggested dir doesn't need to exist.

       Jaap Karssenberg <> Maintained by Michiel Beijen

       Copyright (c) 2003, 2012 Jaap G Karssenberg. All rights reserved.  This
       program is free software; you can redistribute it and/or modify it
       under the same terms as Perl itself.

       File::MimeInfo, File::MimeInfo::Magic, <>

perl v5.18.2			  2013-11-04	      File::MimeInfo::Rox(3pm)

List of man pages available for ElementaryOS

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
Vote for polarhome
Free Shell Accounts :: the biggest list on the net