r897 - in packages/libmime-types-perl/trunk: . debian lib/MIME t
Gunnar Wolf
gwolf@costa.debian.org
Tue, 05 Apr 2005 23:05:54 +0000
Author: gwolf
Date: 2005-04-05 23:05:53 +0000 (Tue, 05 Apr 2005)
New Revision: 897
Modified:
packages/libmime-types-perl/trunk/ChangeLog
packages/libmime-types-perl/trunk/META.yml
packages/libmime-types-perl/trunk/debian/changelog
packages/libmime-types-perl/trunk/lib/MIME/Type.pm
packages/libmime-types-perl/trunk/lib/MIME/Type.pod
packages/libmime-types-perl/trunk/lib/MIME/Types.pm
packages/libmime-types-perl/trunk/lib/MIME/Types.pod
packages/libmime-types-perl/trunk/t/20types.t
Log:
New version 1.15
Modified: packages/libmime-types-perl/trunk/ChangeLog
===================================================================
--- packages/libmime-types-perl/trunk/ChangeLog 2005-04-05 23:04:27 UTC (rev 896)
+++ packages/libmime-types-perl/trunk/ChangeLog 2005-04-05 23:05:53 UTC (rev 897)
@@ -6,6 +6,26 @@
**** Inform Austin Ziegler < mime-types@halostatue.ca> at each release, to
**** update his Ruby port of the module.
+version 1.15: Thu Mar 31 14:12:54 CEST 2005
+
+ - [Ave Wringeley] contributed MIME::Types methods types() and
+ extensions()
+
+ - [Kjetil Kjernsmo] Added non-registered but useful OpenOffice/
+ StarOffice types application/vnd.sun.xml.*
+
+ - [Tatsuhiko Miyagawa] contributed audio/3gpp and video/3gpp
+ from RFC3839.
+
+version 1.14: Wed Nov 24 18:09:49 CET 2004
+
+ - [Ville Skyttä] provided some minor fixes and two new types
+
+ - [Ave Wringley] contributed video/x-ms-wmv
+
+ - [Ave Wringley] reported a bug in MIME::Types->addType, which
+ produced a warning about double declaration where it shoudln't
+
version 1.13: Sat Apr 24 00:15:09 CEST 2004
- [Ville Skyttä] and [Austing Ziegler] updated the type list to
Modified: packages/libmime-types-perl/trunk/META.yml
===================================================================
--- packages/libmime-types-perl/trunk/META.yml 2005-04-05 23:04:27 UTC (rev 896)
+++ packages/libmime-types-perl/trunk/META.yml 2005-04-05 23:05:53 UTC (rev 897)
@@ -1,7 +1,7 @@
# http://module-build.sourceforge.net/META-spec.html
#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
name: MIME-Types
-version: 1.13
+version: 1.15
version_from: lib/MIME/Types.pm
installdirs: site
requires:
Modified: packages/libmime-types-perl/trunk/debian/changelog
===================================================================
--- packages/libmime-types-perl/trunk/debian/changelog 2005-04-05 23:04:27 UTC (rev 896)
+++ packages/libmime-types-perl/trunk/debian/changelog 2005-04-05 23:05:53 UTC (rev 897)
@@ -1,3 +1,10 @@
+libmime-types-perl (1.15-1) unstable; urgency=low
+
+ * New upstream release
+ * Added debian/watch
+
+ -- Gunnar Wolf <gwolf@debian.org> Tue, 5 Apr 2005 18:05:04 -0500
+
libmime-types-perl (1.13-1) unstable; urgency=low
* New upstream release
Modified: packages/libmime-types-perl/trunk/lib/MIME/Type.pm
===================================================================
--- packages/libmime-types-perl/trunk/lib/MIME/Type.pm 2005-04-05 23:04:27 UTC (rev 896)
+++ packages/libmime-types-perl/trunk/lib/MIME/Type.pm 2005-04-05 23:05:53 UTC (rev 897)
@@ -1,6 +1,6 @@
package MIME::Type;
use vars '$VERSION';
-$VERSION = '1.13';
+$VERSION = '1.15';
use strict;
Modified: packages/libmime-types-perl/trunk/lib/MIME/Type.pod
===================================================================
--- packages/libmime-types-perl/trunk/lib/MIME/Type.pod 2005-04-05 23:04:27 UTC (rev 896)
+++ packages/libmime-types-perl/trunk/lib/MIME/Type.pod 2005-04-05 23:05:53 UTC (rev 897)
@@ -62,7 +62,7 @@
I<Example:> use of stringification
- my $mime = Mime::Tyep->new('text/html');
+ my $mime = MIME::Type->new('text/html');
print "$mime\n"; # explicit stringification
print $mime; # implicit stringification
@@ -288,7 +288,7 @@
=head1 COPYRIGHTS
-Module version 1.13.
+Module version 1.15.
Written by Mark Overmeer (mimetypes@overmeer.net). See the ChangeLog for
other contributors.
Modified: packages/libmime-types-perl/trunk/lib/MIME/Types.pm
===================================================================
--- packages/libmime-types-perl/trunk/lib/MIME/Types.pm 2005-04-05 23:04:27 UTC (rev 896)
+++ packages/libmime-types-perl/trunk/lib/MIME/Types.pm 2005-04-05 23:05:53 UTC (rev 897)
@@ -1,7 +1,7 @@
package MIME::Types;
use vars '$VERSION';
-$VERSION = '1.13';
+$VERSION = '1.15';
use strict;
@@ -129,11 +129,7 @@
{ my $self = shift;
foreach my $type (@_)
- {
- carp "WARNING: type $type already registered."
- if $type->isRegistered;
-
- my $simplified = $type->simplified;
+ { my $simplified = $type->simplified;
push @{$list{$simplified}}, $type;
}
@@ -144,8 +140,28 @@
#-------------------------------------------
+sub types
+{ my $self = shift;
+
+ $self->create_type_index unless keys %type_index;
+ return values %type_index;
+}
+
#-------------------------------------------
+
+sub extensions
+{ my $self = shift;
+ $self->create_type_index unless keys %type_index;
+
+ return keys %type_index;
+}
+
+#-------------------------------------------
+
+
+#-------------------------------------------
+
require Exporter;
use vars qw/@ISA @EXPORT_OK/;
@ISA = qw(Exporter);
@@ -349,6 +365,7 @@
application/vnd.eudora.data
application/vnd.fdf
application/vnd.ffsns
+application/vnd.fints
application/vnd.FloGraphIt
application/vnd.framemaker
application/vnd.fsc.weblauch fsc 7bit
@@ -418,7 +435,7 @@
application/vnd.liberty-request+xml
application/vnd.llamagraphics.life-balance.desktop lbd
application/vnd.llamagraphics.life-balance.exchange+xml lbe
-application/vnd.lotus-1-2-3 wks
+application/vnd.lotus-1-2-3 wks,123
application/vnd.lotus-approach
application/vnd.lotus-freelance
application/vnd.lotus-notes
@@ -428,6 +445,7 @@
application/vnd.mcd mcd
application/vnd.mediastation.cdkey
application/vnd.meridian-slingshot
+application/vnd.mfmp mfm
application/vnd.micrografx.flo flo
application/vnd.micrografx.igx igx
application/vnd.mif mif
@@ -513,8 +531,20 @@
application/vnd.sss-dtf
application/vnd.sss-ntf
application/vnd.street-stream
+application/vnd.sun.xml.calc sxc
+application/vnd.sun.xml.calc.template stc
+application/vnd.sun.xml.draw sxd
+application/vnd.sun.xml.draw.template std
+application/vnd.sun.xml.impress sxi
+application/vnd.sun.xml.impress.template sti
+application/vnd.sun.xml.math sxm
+application/vnd.sun.xml.writer sxw
+application/vnd.sun.xml.writer.global sxg
+application/vnd.sun.xml.writer.template stw
+application/vnd.sus-calendar sus,susp
application/vnd.svd
application/vnd.swiftview-ics
+application/vnd.syncml.ds.notification
application/vnd.triscape.mxs
application/vnd.trueapp
application/vnd.truedoc
@@ -565,6 +595,7 @@
application/whoispp-query
application/whoispp-response
application/wita
+application/wordperfect5.1 wp5,wp
application/x-123 wk
application/x-access
application/x-bcpio bcpio
@@ -607,7 +638,7 @@
application/x-lotus-123
application/x-mac-compactpro cpt
application/x-maker frm,maker,frame,fm,fb,book,fbdoc
-application/x-mathcad mcd
+application/x-mathcad # mcd, but there is also vnd.mcd
application/x-mif mif
application/xml
application/xml-dtd
@@ -651,13 +682,12 @@
application/x-wais-source src
application/x-Wingz wz
application/x-word base64
-application/x-wordperfect5.1 wp5,wp
application/x-wordperfect6.1 wp6
application/x-x400-bp
application/x-x509-ca-cert crt base64
application/zip zip base64
-applivation/vnd.fints
audio/32kadpcm
+audio/3gpp 3gpp
audio/AMR amr base64
audio/AMR-WB awb base64
audio/basic au,snd base64
@@ -861,6 +891,7 @@
text/x-sgml sgml,sgm 8bit
text/x-vCalendar vcs 8bit
text/x-vCard vcf 8bit
+video/3gpp 3gp,3gpp
video/BMPEG
video/BT656
video/CelB
@@ -898,6 +929,7 @@
video/vnd.vivo viv,vivo
video/x-fli fli base64
video/x-ms-asf asf,asx
+video/x-ms-wmv wmv
video/x-msvideo avi base64
video/x-sgi-movie movie base64
x-chemical/x-pdb pdb
Modified: packages/libmime-types-perl/trunk/lib/MIME/Types.pod
===================================================================
--- packages/libmime-types-perl/trunk/lib/MIME/Types.pod 2005-04-05 23:04:27 UTC (rev 896)
+++ packages/libmime-types-perl/trunk/lib/MIME/Types.pod 2005-04-05 23:05:53 UTC (rev 897)
@@ -78,10 +78,21 @@
the sub-type must start with C<x->.
Please inform the maintainer of this module when registered types
-are missing.
+are missing. Before version MIME::Types version 1.14, a warning
+was produced when an unknown IANA type was added. This has been
+removed, because some people need that to get their application
+to work locally... broken applications...
=back
+$obj-E<gt>B<extensions>
+
+=over 4
+
+Returns a list of all defined extensions.
+
+=back
+
$obj-E<gt>B<mimeTypeOf>(FILENAME)
=over 4
@@ -116,28 +127,28 @@
=back
+$obj-E<gt>B<types>
+=over 4
-=head1 DIAGNOSTICS
+Returns a list of all defined mime-types
-I<Warning:> type $type already registered.
+=back
-You try to register a type, when it is already known. This means that
-you are duplicating work (with chance on errors) or have knowledge you
-can contribute to this module (please contact the author).
+
=head1 REFERENCES
See the Mime::Types website at L<http://perl.overmeer.net/mimetypes/> for more details.
=head1 COPYRIGHTS
-Module version 1.13.
+Module version 1.15.
Written by Mark Overmeer (mimetypes@overmeer.net). See the ChangeLog for
other contributors.
Modified: packages/libmime-types-perl/trunk/t/20types.t
===================================================================
--- packages/libmime-types-perl/trunk/t/20types.t 2005-04-05 23:04:27 UTC (rev 896)
+++ packages/libmime-types-perl/trunk/t/20types.t 2005-04-05 23:05:53 UTC (rev 897)
@@ -8,7 +8,7 @@
use lib qw(. t);
-BEGIN {plan tests => 22}
+BEGIN {plan tests => 21}
use MIME::Types;
@@ -50,14 +50,7 @@
is($q->type, 'application/x-msword');
is($a->mimeTypeOf('my.lzh')->type, 'application/octet-stream');
-my $r1 = MIME::Type->new(type => 'text/fake1');
my $warn;
-{ $SIG{__WARN__} = sub {$warn = join '',@_};
- $a->addType($r1);
-}
-like($warn, qr/registered/);
-
-undef $warn;
my $r2 = MIME::Type->new(type => 'text/x-fake2');
{ $SIG{__WARN__} = sub {$warn = join '',@_};
$a->addType($r2);