summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlperl/lib/LWP/MediaTypes.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/tlperl/lib/LWP/MediaTypes.pm')
-rw-r--r--Master/tlpkg/tlperl/lib/LWP/MediaTypes.pm26
1 files changed, 4 insertions, 22 deletions
diff --git a/Master/tlpkg/tlperl/lib/LWP/MediaTypes.pm b/Master/tlpkg/tlperl/lib/LWP/MediaTypes.pm
index f7fc671a5bc..8c2a8aee334 100644
--- a/Master/tlpkg/tlperl/lib/LWP/MediaTypes.pm
+++ b/Master/tlpkg/tlperl/lib/LWP/MediaTypes.pm
@@ -4,7 +4,7 @@ require Exporter;
@ISA = qw(Exporter);
@EXPORT = qw(guess_media_type media_suffix);
@EXPORT_OK = qw(add_type add_encoding read_media_types);
-$VERSION = "5.835";
+$VERSION = "6.02";
use strict;
@@ -41,13 +41,6 @@ read_media_types();
-sub _dump {
- require Data::Dumper;
- Data::Dumper->new([\%suffixType, \%suffixExt, \%suffixEncoding],
- [qw(*suffixType *suffixExt *suffixEncoding)])->Dump;
-}
-
-
sub guess_media_type
{
my($file, $header) = @_;
@@ -168,24 +161,13 @@ sub read_media_types
local($/, $_) = ("\n", undef); # ensure correct $INPUT_RECORD_SEPARATOR
my @priv_files = ();
- if($^O eq "MacOS") {
- push(@priv_files, "$ENV{HOME}:media.types", "$ENV{HOME}:mime.types")
- if defined $ENV{HOME}; # Some does not have a home (for instance Win32)
- }
- else {
- push(@priv_files, "$ENV{HOME}/.media.types", "$ENV{HOME}/.mime.types")
- if defined $ENV{HOME}; # Some doesn't have a home (for instance Win32)
- }
+ push(@priv_files, "$ENV{HOME}/.media.types", "$ENV{HOME}/.mime.types")
+ if defined $ENV{HOME}; # Some doesn't have a home (for instance Win32)
# Try to locate "media.types" file, and initialize %suffixType from it
my $typefile;
unless (@files) {
- if($^O eq "MacOS") {
- @files = map {$_."LWP:media.types"} @INC;
- }
- else {
- @files = map {"$_/LWP/media.types"} @INC;
- }
+ @files = map {"$_/LWP/media.types"} @INC;
push @files, @priv_files;
}
for $typefile (@files) {