--- MMagic.pm.dist 2006-05-23 08:55:27.000000000 +0300
+++ MMagic.pm 2012-05-15 10:10:54.515625000 +0300
@@ -112,12 +112,12 @@
use File::MMagic;
use FileHandle;
- $mm = new File::MMagic; # use internal magic file
+ $mm = File::MMagic->new; # use internal magic file
# $mm = File::MMagic->new('/etc/magic'); # use external magic file
# $mm = File::MMagic->new('/usr/share/etc/magic'); # if you use Debian
$res = $mm->checktype_filename("/somewhere/unknown/file");
- $fh = new FileHandle "< /somewhere/unknown/file2";
+ $fh = FileHandle->new("< /somewhere/unknown/file2");
$res = $mm->checktype_filehandle($fh);
$fh->read($data, 0x8564);
@@ -366,7 +366,7 @@
&readMagicHandle($self, $fh);
} else {
my $filename = shift;
- my $fh = new FileHandle;
+ my $fh = FileHandle->new;
if ($fh->open("< $filename")) {
binmode($fh);
&readMagicHandle($self, $fh);
@@ -540,7 +540,7 @@
my $fh;
# $fh = new FileHandle "< $file" or die "$F: $file: $!\n" ;
- $fh = new FileHandle "< $file" or return "x-system/x-error; $file: $!\n" ;
+ $fh = FileHandle->new("< $file") or return "x-system/x-error; $file: $!\n" ;
binmode($fh); # for MSWin32