![]() |
![]()
| ![]() |
![]()
NAMEFile::MimeInfo::Rox - Open files by mimetype "Rox style" SYNOPSISuse File::MimeInfo::Magic; use File::MimeInfo::Rox qw/:magic/; # open some file with the appropriate program mime_system($somefile); # 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"; DESCRIPTIONThis 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 "Choices" directories for a program to handle that mimetype. See the rox documentation for an extensive discussion of this mechanism. EXPORTThe 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. ENVIRONMENTThe environment variable "CHOICESPATH" is used when searching for rox's config dirs. It defaults to "$ENV{HOME}/Choices:/usr/local/share/Choices:/usr/share/Choices" METHODS
AUTHORJaap Karssenberg <pardus@cpan.org> Maintained by Michiel Beijen <mb@x14.nl> COPYRIGHTCopyright (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 ALSOFile::MimeInfo, File::MimeInfo::Magic, <http://rox.sourceforce.net>
|