Skip Menu |
 

This queue is for tickets about the File-MMagic CPAN distribution.

Report information
The Basics
Id: 77208
Status: new
Priority: 0/
Queue: File-MMagic

People
Owner: Nobody in particular
Requestors: CHORNY [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 1.27
Fixed in: (no value)



Subject: [patch] no inderect object notation
Subject: MMagic.pm.1.patch
Download MMagic.pm.1.patch
text/x-diff 1.2k
--- 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


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.