Skip Menu |

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

Report information
The Basics
Id: 74252
Status: open
Priority: 0/
Queue: File-MMagic

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

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



Subject: [patch] defined(@array) is deprecated
Using defined(@array) has actually been deprecated for quite a while. The symptom is messages like this while testing: t/01-selfcheck.t ... defined(@array) is deprecated at /Users/tom/.cpan/build/File-MMagic-1.27-_2JGII/blib/lib/File/MMagic.pm line 1122. (Maybe you should just omit the defined()?) t/01-selfcheck.t ... ok Normally I would consider something like this to be cosmetic, but when dependents test for unexpected warnings this causes them to fail. A patch is attached.
Subject: File-MMagic.patch
--- MMagic.old 2006-05-23 01:55:27.000000000 -0400 +++ MMagic.pm 2012-01-22 19:34:09.000000000 -0500 @@ -339,7 +339,7 @@ t => "\t", f => "\f"); -$VERSION = "1.27"; +$VERSION = "1.27_01"; $allowEightbit = 1; } @@ -1119,7 +1119,7 @@ $$MF[1] = $line; return length($thisDepth); } - elsif (defined(@$entry)) { + elsif ( 'ARRAY' eq ref $entry && @$entry ) { # already have an entry. this is not a continuation. # save this line for the next call and exit. $$MF[1] = $line;
I've dist-ified the patch supplied by wyant above for others convenience as an interim fix.

cpanm "https://github.com/downloads/kentfredric/File-MMagic/File-MMagic-1.27_01.tar.gz"

Should JustWork(TM)

 

Subject: Re: [rt.cpan.org #74252] [patch] defined(@array) is deprecated
Date: Fri, 16 Mar 2012 08:19:20 +0900
To: bug-File-MMagic [...] rt.cpan.org
From: NOKUBI Takatsugu <knok [...] daionet.gr.jp>
Thank you guys. At Sun, 22 Jan 2012 19:35:08 -0500, Tom Wyant via RT wrote: Show quoted text
> Using defined(@array) has actually been deprecated for quite a while. > The symptom is messages like this while testing:
I committed the patch for svn HEAD. http://cvs.namazu.org/Subversion?view=revision&revision=281 I'll release new version in the near future.
On Sun Jan 22 19:35:07 2012, WYANT wrote: Show quoted text
> Using defined(@array) has actually been deprecated for quite a while. > The symptom is messages like this while testing: > > t/01-selfcheck.t ... defined(@array) is deprecated at > /Users/tom/.cpan/build/File-MMagic-1.27-_2JGII/blib/lib/File/MMagic.pm > line 1122. > (Maybe you should just omit the defined()?) > t/01-selfcheck.t ... ok > > Normally I would consider something like this to be cosmetic, but when > dependents test for unexpected warnings this causes them to fail.
Can you tell me which modules in particular are failing? I’m trying to find out the scope of the breakage to determine whether this should block perl 5.16.
On 2012-03-28 05:49:25, SPROUT wrote:
Show quoted text
>
> Can you tell me which modules in particular are failing? I’m trying
> to find out the scope of
> the breakage to determine whether this should block perl 5.16.

I believe Module::CPANTS::Analyse is affected by this bug in addition to the one caused by Module::Find you listed on the recent p5p broken modules list. I had to fix both that and this to get MCA to work.



Show quoted text
> Can you tell me which modules in particular are failing? I’m trying
> to find out the scope of
> the breakage to determine whether this should block perl 5.16.

Module::CPANTS::Analyse
 --> Archive::Any
 ------> File::MMagic
-------> Module::Find

I'd have hoped Archive::Any would fail tests and exhibit this error instead of it being propagated up to its consumers, but heh.

So I did a batch of tests of things depending on Archive::Any for interest sakes, and only found one obvious failure related to File::MMagic

https://metacpan.org/release/CPAN-Digger # File::MMagic triggers a no-warnings test failure ( also hits YAML::Any defined(@array) bug! ) 

 

 

 

On Tue Mar 27 12:49:25 2012, SPROUT wrote: Show quoted text
> On Sun Jan 22 19:35:07 2012, WYANT wrote:
> > Using defined(@array) has actually been deprecated for quite a
> while.
> > The symptom is messages like this while testing: > > > > t/01-selfcheck.t ... defined(@array) is deprecated at > > /Users/tom/.cpan/build/File-MMagic-1.27-
> _2JGII/blib/lib/File/MMagic.pm
> > line 1122. > > (Maybe you should just omit the defined()?) > > t/01-selfcheck.t ... ok > > > > Normally I would consider something like this to be cosmetic, but
> when
> > dependents test for unexpected warnings this causes them to fail.
> > Can you tell me which modules in particular are failing? I’m trying > to find out the scope of > the breakage to determine whether this should block perl 5.16.
Unfortunately I no longer know how I fell across this - I patched it and moved on. The only direct dependence I find in my lib/ directory is in Archive::Any. Would you like me to re-install 5.15.9 and all my usual modules _without_ the File::MMagic patch, to see what that turns up? It's only a couple hours for the computer, since I still have the Perl build. But it may take me a day or two to get it done, I'm afraid.
On Tue Mar 27 20:16:05 2012, WYANT wrote: Show quoted text
> On Tue Mar 27 12:49:25 2012, SPROUT wrote:
> > On Sun Jan 22 19:35:07 2012, WYANT wrote:
> > > Using defined(@array) has actually been deprecated for quite a
> > while.
> > > The symptom is messages like this while testing: > > > > > > t/01-selfcheck.t ... defined(@array) is deprecated at > > > /Users/tom/.cpan/build/File-MMagic-1.27-
> > _2JGII/blib/lib/File/MMagic.pm
> > > line 1122. > > > (Maybe you should just omit the defined()?) > > > t/01-selfcheck.t ... ok > > > > > > Normally I would consider something like this to be cosmetic, but
> > when
> > > dependents test for unexpected warnings this causes them to fail.
> > > > Can you tell me which modules in particular are failing? I’m trying > > to find out the scope of > > the breakage to determine whether this should block perl 5.16.
> > Unfortunately I no longer know how I fell across this - I patched it and > moved on. The only direct dependence I find in my lib/ directory is in > Archive::Any. > > Would you like me to re-install 5.15.9 and all my usual modules > _without_ the File::MMagic patch, to see what that turns up? It's only a > couple hours for the computer, since I still have the Perl build. But it > may take me a day or two to get it done, I'm afraid.
Don’t worry about it. As Kent Fredric has already pointed out, Module::CPANTS::Analyse and CPAN::Digger are broken by it. I’m also going through all its dependents gradually, but have not found any others so far.
On Tue Mar 27 20:19:01 2012, SPROUT wrote: Show quoted text
> On Tue Mar 27 20:16:05 2012, WYANT wrote:
> > On Tue Mar 27 12:49:25 2012, SPROUT wrote:
> > > On Sun Jan 22 19:35:07 2012, WYANT wrote:
> > > > Using defined(@array) has actually been deprecated for quite a
> > > while.
> > > > The symptom is messages like this while testing: > > > > > > > > t/01-selfcheck.t ... defined(@array) is deprecated at > > > > /Users/tom/.cpan/build/File-MMagic-1.27-
> > > _2JGII/blib/lib/File/MMagic.pm
> > > > line 1122. > > > > (Maybe you should just omit the defined()?) > > > > t/01-selfcheck.t ... ok > > > > > > > > Normally I would consider something like this to be cosmetic,
> but
> > > when
> > > > dependents test for unexpected warnings this causes them to
> fail.
> > > > > > Can you tell me which modules in particular are failing? I’m
> trying
> > > to find out the scope of > > > the breakage to determine whether this should block perl 5.16.
> > > > Unfortunately I no longer know how I fell across this - I patched it
> and
> > moved on. The only direct dependence I find in my lib/ directory is
> in
> > Archive::Any. > > > > Would you like me to re-install 5.15.9 and all my usual modules > > _without_ the File::MMagic patch, to see what that turns up? It's
> only a
> > couple hours for the computer, since I still have the Perl build.
> But it
> > may take me a day or two to get it done, I'm afraid.
> > Don’t worry about it. As Kent Fredric has already pointed out, > Module::CPANTS::Analyse and > CPAN::Digger are broken by it. I’m also going through all its > dependents gradually, but have > not found any others so far.
Looks like my failure was Module::CPANTS::Analyse. The stack seems to say that Module::CPANTS::Analyse had a problem because Archive::Any did -- though both File::MMagic and Archive::Any installed without problems. To get this far (under Perl 5.15.9) I had to force-install YAML (to get my ~/.cpan/prefs/*.yml processed) and Test::Warn, though I don't think either of these are related to File::MMagic. What I did was to reinstall 5.15.9, followed by installing Bundle::CPAN, Task-Tom (unpublished), and Task-Tom-Devel (also unpublished). I have attached four files: * module-cpants-analyse.log is the test output for Module::CPANTS::Analyse, captured by $ ./Build 2>&1 | tee ~/module-cpants-analyse.log * stoppers.txt is my notes on the install, and what failed the first time around. * The two Build.PL files are for Task-Tom and Task-Tom-Devel, so you will have an idea what actually got installed over and above the base and Bundle::CPAN
Subject: Task-Tom-Build.PL
use 5.006; use strict; use warnings; use Module::Build; use Config; (my $mbv = Module::Build->VERSION) =~ s/_//g; my %args = ( dist_author => 'Tom Wyant (wyant at cpan dot org)', dist_abstract => q{Tom Wyant's preferred modules}, module_name => 'Task::Tom', build_requires => { }, requires => { 'App::Ack' => 0, 'App::Perldoc::Search' => 0, 'Archive::Tar' => 0, 'Astro::Coord::ECI' => 0, 'Astro::SIMBAD::Client' => 0, 'Astro::SpaceTrack' => 0, 'Astro::UTDF' => 0, 'CGI' => 0, 'CGI::Carp' => 0, 'CGI::Pretty' => 0, 'CPAN' => 0, 'CPANDB' => 0, 'Carp' => 0, 'Carp::Heavy' => 0, # 'Clipboard' => 0, 'Config' => 0, 'Config::Tiny' => 0, 'Cwd' => 0, 'DBI' => 0, 'Data::Dumper' => 0, 'Date::Manip' => 0, 'Date::Tolkien::Shire' => 0, 'Devel::Symdump' => 0, 'Digest::MD5' => 0, 'Digest::SHA1' => 0, 'Encode' => 0, 'Encode::RAD50' => 0, 'English' => 0, 'ExtUtils::Installed' => 0, 'ExtUtils::MakeMaker' => 0, 'ExtUtils::Manifest' => 0, 'File::Basename' => 0, 'File::Copy' => 0, 'File::Find' => 0, 'File::Glob' => 0, 'File::HomeDir' => 0, 'File::Path' => 0, 'File::Remove' => 0, 'File::Spec' => 0, 'File::Temp' => 0, 'FileHandle' => 0, 'Games::Sudoku::General' => 0, 'Geo::Coder::Geocoder::US' => 0, 'Geo::Coder::OSM' => 0, 'Geo::Coder::TomTom' => 0, 'Geo::WebService::Elevation::USGS' => 0, 'Getopt::Long' => 2.33, 'HTML::Entities' => 0, 'HTML::Parser' => 0, 'HTML::TableContentParser' => 0, 'HTML::TokeParser' => 0, 'HTTP::Daemon' => 0, 'HTTP::Response' => 0, 'Hash::Util::FieldHash' => 0, 'IO::Dir' => 0, 'IO::File' => 0, 'IO::Handle' => 0, 'IO::Zlib' => 0, 'IPC::System::Simple' => 0, 'LWP::Simple' => 0, 'LWP::UserAgent' => 0, 'List::MoreUtils' => 0, 'List::Util' => 0, 'MIME::Parser' => 0, 'Math::MatrixReal' => 0, 'Math::Trig' => 0, 'Math::VectorReal' => 0, 'Module::Build' => 0, 'Module::Build::Version' => 0, 'Module::CoreList' => 0, 'Module::Load' => 0, 'Net::FTP' => 0, 'Net::IP' => 0, 'Net::Ping' => 0, 'POSIX' => 0, 'PPI::Document' => 0, 'PPI::Dumper' => 0, 'PPIx::Regexp::Dumper' => 0, 'Params::Util' => 0.25, 'Perl::Critic' => 0, 'PerlIO' => 0, 'PerlIO::eol' => 0, 'Pod::Html' => 0, 'Pod::Usage' => 0, 'Proc::ProcessTable' => 0, 'SOAP::Lite' => 0, 'SOAP::Transport::HTTP' => 0, 'Scalar::Util' => 0, 'Socket' => 0, 'Sort::Naturally' => 0, 'Spreadsheet::WriteExcel' => 0, 'Sys::Hostname' => 0, 'Template' => 0, 'Term::ANSIColor' => 0, 'Term::ReadKey' => 0, 'Term::ReadLine' => 0, 'Test' => 0, 'Test::More' => 0, 'Text::Abbrev' => 0, 'Text::CSV' => 0, 'Text::ParseWords' => 0, 'Text::Wrap' => 0, 'Time::Local' => 0, 'URI' => 0, 'URI::Escape' => 0, 'Win32::Process::Info' => 0, # 'WWW::Babelfish' => 0, 'XML::RSS::Feed' => 0, 'XML::Writer' => 0, 'YAML' => 0, 'attributes' => 0, 'autodie' => 0, 'charnames' => 0, 'constant' => 0, 'encoding' => 0, 'lib' => 0, 'overload' => 0, 'strict' => 0, 'utf8' => 0, 'vars' => 0, 'version' => 0, 'warnings' => 0, }, dynamic_config => 1, license => 'perl', ); if ( 'darwin' eq $^O ) { foreach ( [ 'Mac::Apps::Launch' => 0 ], [ 'Mac::Pasteboard' => 0 ], [ 'Mac::Processes' => 0 ], [ 'MacOSX::Alias' => 0 ], # [ 'MacOSX::File::Constants' => 0 ], # [ 'MacOSX::File::Info' => 0 ], # [ 'MacOSX::File::Spec' => 0 ], ) { $args{requires}{$_->[0]} = $_->[1]; } } $mbv >= 0.28 and $args{meta_merge} = { no_index => { directory => [qw{inc t}], }, resources => { bugtracker => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Encode-RAD50', }, }; $mbv >= 0.34 and $args{auto_configure_requires} = 0; # Don't require Module::Build my $bldr = Module::Build->new(%args); $bldr->create_build_script ();
Subject: Task-Tom-Devel-Build.PL
use 5.006; use strict; use warnings; use Module::Build; use Config; (my $mbv = Module::Build->VERSION) =~ s/_//g; my %args = ( dist_author => 'Tom Wyant (wyant at cpan dot org)', dist_abstract => q{Tom Wyant's preferred modules for development}, module_name => 'Task::Tom::Devel', build_requires => { }, requires => { 'Archive::Tar' => 0, 'CPAN::Mini' => 0, 'CPAN::Checksums' => 0, 'Devel::Cover' => 0, 'Devel::EnforceEncapsulation' => 0, 'Devel::Hide' => 0, 'ExtUtils::Manifest' => 0, 'Module::Install' => 0, 'Perl::Critic' => 0, 'Perl::Critic::More' => 0, 'Perl::Tidy' => 0, 'Pod::Spell' => 0, 'Readonly::XS' => 0, 'Test::CPAN::Changes' => 0, 'Test::Kwalitee' => 0, 'Test::Memory::Cycle' => 0, 'Test::MockTime' => 0, 'Test::More' => 0, 'Test::Perl::Critic' => 0, 'Test::Pod' => 0, 'Test::Pod::Coverage' => 0, 'Test::Spelling' => 0, 'Test::Without::Module' => 0, ## 'warnings::unused' => 0, }, # dynamic_config => 1, license => 'perl', ); $mbv >= 0.28 and $args{meta_merge} = { no_index => { directory => [qw{inc t}], }, resources => { bugtracker => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Encode-RAD50', }, }; my $bldr = Module::Build->new(%args); $bldr->create_build_script ();
Subject: stoppers.txt
When I install Bundle::CPAN, there appear to be no problems. When I install Task-Tom without patching File::MMagic, I get the following failures: INGY/YAML-0.80.tar.gz : make_test NO The failure is in t/dump-perl-types.t, and is not related to File::MMagic as far as I can tell; it appears to be related to how 'use strict' is decompiles. Think I forced this on the last install. CHORNY/Test-Warn-0.23.tar.gz : make_test NO Not sure what is going on here -- seems to be related to STDERR handling, not File::MMagic. Think I forced this on the last install. OVID/Test-Most-0.25.tar.gz : make_test NO one dependency not OK (Test::Warn); additionally test harness failed Fails because Test::Warn fails. LETO/Math-MatrixReal-2.09.tar.gz : make_test NO one dependency not OK (Test::Most); additionally test harness failed Relies on Test::Most. SDRABBLE/HTML-TableContentParser-0.13.tar.gz : make_test NO Relies on bug fixed in 5.9.something. Not patched because YAML not installed. /Users/tom/Code/perl/Task-Tom/. : make_test NO 3 dependencies missing (YAML,Math::MatrixReal,HTML::TableContentParser) After the above, I force-installed YAML and Test::Warn, and the rest of the failures installed without problems. When I instal Task-Tom-Devel without patching File::MMagic, I get the following failures: Failed during this command: CHORNY/Module-CPANTS-Analyse-0.85.tar.gz : make_test NO Failed because of errors thrown in File::MMagic CHROMATIC/Test-Kwalitee-1.01.tar.gz : make_test NO one dependency not OK (Module::CPANTS::Analyse); additionally test harness failed /Users/tom/Code/perl/Task-Tom-Devel/. : make_test NO one dependency not OK (Test::Kwalitee)
Subject: module-cpants-analyse.log
Download module-cpants-analyse.log
application/octet-stream 25.3k

Message body not shown because it is not plain text.