Codex

File::MimeInfo::Rox

Section: User Contributed Perl Documentation (3pm)

Updated: 2014-05-11

Index?action=index Return to Main Contents


NAME

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

SYNOPSIS

DESCRIPTION

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

See the rox documentation for an extensive discussion of this mechanism.

EXPORT

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

ENVIRONMENT

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

METHODS

:"mime_system($file)"

"mime_system($file, $mimetype, @_)"
Try to open with the appropriate program for files of it's mimetype. You can use 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 is returned. If the actual system fails an exception is raised.

All remaining arguments are passed on to the handler.

:

:"mime_exec($file)"

"mime_exec($file, $mimetype, @_)"
Like but uses exec instead of system, so it never returns if successful.:
"suggest_script_name($mimetype)"
Returns the list for the suggested place to write new script files (or symlinks) for mimetype . The suggested dir doesn't need to exist.:

AUTHOR

Jaap Karssenberg <[email protected]> Maintained by Michiel Beijen <[email protected]>

COPYRIGHT

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.

SEE ALSO

File::MimeInfo, File::MimeInfo::Magic, <http://rox.sourceforge.net>


Index

NAME

SYNOPSIS

DESCRIPTION

EXPORT

ENVIRONMENT

METHODS

AUTHOR

COPYRIGHT

SEE ALSO