r35281 - in /branches/upstream/libfile-libmagic-perl/current: Changes LibMagic.pm README t/6-oo.t

ryan52-guest at users.alioth.debian.org ryan52-guest at users.alioth.debian.org
Wed May 13 00:54:36 UTC 2009


Author: ryan52-guest
Date: Wed May 13 00:54:30 2009
New Revision: 35281

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=35281
Log:
[svn-upgrade] Integrating new upstream version, libfile-libmagic-perl (0.92)

Modified:
    branches/upstream/libfile-libmagic-perl/current/Changes
    branches/upstream/libfile-libmagic-perl/current/LibMagic.pm
    branches/upstream/libfile-libmagic-perl/current/README
    branches/upstream/libfile-libmagic-perl/current/t/6-oo.t

Modified: branches/upstream/libfile-libmagic-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-libmagic-perl/current/Changes?rev=35281&op=diff
==============================================================================
--- branches/upstream/libfile-libmagic-perl/current/Changes (original)
+++ branches/upstream/libfile-libmagic-perl/current/Changes Wed May 13 00:54:30 2009
@@ -1,4 +1,9 @@
 Revision history for Perl extension File::LibMagic.
+
+0.92 
+      May 2009
+
+      "normalisation"-problem -> changed t/6-oo.t
 
 0.91
       Feb 2009

Modified: branches/upstream/libfile-libmagic-perl/current/LibMagic.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-libmagic-perl/current/LibMagic.pm?rev=35281&op=diff
==============================================================================
--- branches/upstream/libfile-libmagic-perl/current/LibMagic.pm (original)
+++ branches/upstream/libfile-libmagic-perl/current/LibMagic.pm Wed May 13 00:54:30 2009
@@ -30,7 +30,7 @@
 
 our @EXPORT = qw( );
 
-our $VERSION = '0.91';
+our $VERSION = '0.92';
 
 sub AUTOLOAD {
     # This AUTOLOAD is used to 'autoload' constants from the constant()
@@ -170,7 +170,27 @@
 The C<File::LibMagic> is a simple perlinterface to libmagic from
 the file-4.x or file-5.x package from Christos Zoulas (ftp://ftp.astron.com/pub/file/).
 
-=head2 new
+You can use the simple Interface like MagicBuffer() or MagicFile(), use the
+functions of libmagic(3) or use the OO-Interface.
+
+=head2 Simple Interface
+
+=head3 MagicBuffer() 
+
+fixme
+
+=head3 MagicFile()
+
+fixme
+
+=head2 libmagic(3)
+
+magic_open, magic_close, magic_error, magic_file, magic_buffer, magic_setflags, magic_check, magic_compile,
+magic_load -- Magic number recognition library
+
+=head2 OO-Interface
+
+=head3 new
 
 Create a new File::LibMagic object to use for determining the type or MIME
 type of content.
@@ -184,20 +204,20 @@
 Each File::LibMagic object loads the magic database independently of other
 File::LibMagic objects.
 
-=head2 checktype_contents
+=head3 checktype_contents
 
 Returns the MIME type of the data given as the first argument.
 
-=head2 checktype_filename
+=head3 checktype_filename
 
 Returns the MIME type of the given file.  This will be the same as returned by
 the C<file -i> command.
 
-=head2 describe_contents
+=head3 describe_contents
 
 Returns a description of the data given as the first argument.
 
-=head2 describe_filename
+=head3 describe_filename
 
 Returns the MIME type of the given file.  This will be the same as returned by
 the C<file> command.
@@ -245,9 +265,11 @@
 
 =head1 BUGS
 
-I'm still learning perlxs ...
-
 =over 1
+
+=item "normalisation"-problem, fixme
+
+=item I'm still learning perlxs ...
 
 =item still no real error handling (printf is not enough)
 
@@ -293,7 +315,7 @@
 June 2006 version 0.8x (x>1)
 Michael Hendricks started to put a lot of work into File::LibMagic.
 
-Febuary 2009 latest relase.
+May 2009 latest relase.
 
 =head1 AUTHOR
 
@@ -308,3 +330,4 @@
 it under the same terms as Perl itself. 
 
 =cut
+

Modified: branches/upstream/libfile-libmagic-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-libmagic-perl/current/README?rev=35281&op=diff
==============================================================================
--- branches/upstream/libfile-libmagic-perl/current/README (original)
+++ branches/upstream/libfile-libmagic-perl/current/README Wed May 13 00:54:30 2009
@@ -1,4 +1,4 @@
-File/LibMagic version 0.91
+File/LibMagic version 0.92
 ==========================
 
 DESCRIPTION
@@ -23,6 +23,9 @@
         (ftp://ftp.astron.com/pub/file/)
   o) on some systems zlib is required.
 
+  o) COMMON PROBLEM: magic.h is not correctly placed (e.g. in /usr/include/
+     or /usr/local/include/)
+
 RELATED MODULES
 
 I created File::LibMagic because I wanted to use libmagic (from file-4.x) and 
@@ -46,7 +49,7 @@
 
 Author: Andreas Fitzner <fitzner at informatik.hu-berlin.de>, 
         Michael Hendricks <michael at ndrix.org>
-Feb 2009
+May 2009
 
 This library is free software; you can redistribute it and/or
 modify it under the same terms as Perl itself.

Modified: branches/upstream/libfile-libmagic-perl/current/t/6-oo.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-libmagic-perl/current/t/6-oo.t?rev=35281&op=diff
==============================================================================
--- branches/upstream/libfile-libmagic-perl/current/t/6-oo.t (original)
+++ branches/upstream/libfile-libmagic-perl/current/t/6-oo.t Wed May 13 00:54:30 2009
@@ -24,8 +24,9 @@
     my ($descr, $mime) = @$expect;
     $file = "t/samples/$file";
 
-    is( $flm->checktype_filename($file), $mime,  "MIME $file"     );
-    is( $flm->describe_filename($file),  $descr, "Describe $file" );
+    $mime=~s/;/;?/g;
+    like( $flm->checktype_filename($file), qr#$mime#,  "MIME $file"     );
+    is  ( $flm->describe_filename($file),  $descr, "Describe $file" );
 
     my $data = do {
         local $/;
@@ -33,8 +34,8 @@
         <$fh>;
     };
 
-    is( $flm->checktype_contents($data), $mime,  "MIME data $file"     );
-    is( $flm->describe_contents($data),  $descr, "Describe data $file" );
+    like( $flm->checktype_contents($data), qr#$mime#,  "MIME data $file"     );
+    is  ( $flm->describe_contents($data),  $descr, "Describe data $file" );
 }
 
 # try using a custom magic database




More information about the Pkg-perl-cvs-commits mailing list