Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 615146 - <dev-perl/Chart-2.4.10 fails tests on perl >5.22 (Can't use 'defined(@array)')
Summary: <dev-perl/Chart-2.4.10 fails tests on perl >5.22 (Can't use 'defined(@array)')
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Perl team
URL:
Whiteboard:
Keywords: TESTFAILURE
Depends on: 622238
Blocks:
  Show dependency tree
 
Reported: 2017-04-10 08:38 UTC by Kent Fredric (IRC: kent\n) (RETIRED)
Modified: 2017-06-22 05:20 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2017-04-10 08:38:55 UTC
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t                       
t/bars.t ........... Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at /var/tmp/portage/dev-perl/Chart-2.4.6-r1/work/Chart-2.4.6/blib/lib/Chart/Base.pm line 181.
Compilation failed in require at /var/tmp/portage/dev-perl/Chart-2.4.6-r1/work/Chart-2.4.6/blib/lib/Chart/Bars.pm line 17.                                                                
BEGIN failed--compilation aborted at /var/tmp/portage/dev-perl/Chart-2.4.6-r1/work/Chart-2.4.6/blib/lib/Chart/Bars.pm line 17.                                                            
Compilation failed in require at t/bars.t line 3.                                                                                                                                         
BEGIN failed--compilation aborted at t/bars.t line 3.                                                                                                                                     
t/bars.t ........... Dubious, test returned 255 (wstat 65280, 0xff00)                                                                                                                     
No subtests run                                                                                                                                                                           
t/bars_10.t ........ Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at /var/tmp/portage/dev-perl/Chart-2.4.6-r1/work/Chart-2.4.6/blib/lib/Chart/Base.pm line 181.
Compilation failed in require at /var/tmp/portage/dev-perl/Chart-2.4.6-r1/work/Chart-2.4.6/blib/lib/Chart/Bars.pm line 17.                                                                
BEGIN failed--compilation aborted at /var/tmp/portage/dev-perl/Chart-2.4.6-r1/work/Chart-2.4.6/blib/lib/Chart/Bars.pm line 17.                                                            
Compilation failed in require at t/bars_10.t line 3.                                                                                                                                      
BEGIN failed--compilation aborted at t/bars_10.t line 3.                                                                                                                                  
t/bars_10.t ........ Dubious, test returned 255 (wstat 65280, 0xff00)                                                                                                                     
No subtests run                                                                                                                                                                           
t/bars_2.t ......... Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at /var/tmp/portage/dev-perl/Chart-2.4.6-r1/work/Chart-2.4.6/blib/lib/Chart/Base.pm line 181.
Compilation failed in require at /var/tmp/portage/dev-perl/Chart-2.4.6-r1/work/Chart-2.4.6/blib/lib/Chart/Bars.pm line 17.                                                                
BEGIN failed--compilation aborted at /var/tmp/portage/dev-perl/Chart-2.4.6-r1/work/Chart-2.4.6/blib/lib/Chart/Bars.pm line 17.                                                            
Compilation failed in require at t/bars_2.t line 3.                                                                                                                                       
BEGIN failed--compilation aborted at t/bars_2.t line 3.                                                                                                                                   
t/bars_2.t ......... Dubious, test returned 255 (wstat 65280, 0xff00)                                                                                                                     
No subtests run                                                                                                                                                                           
t/bars_3.t ......... Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at /var/tmp/portage/dev-perl/Chart-2.4.6-r1/work/Chart-2.4.6/blib/lib/Chart/Base.pm line 181.
Compilation failed in require at /var/tmp/portage/dev-perl/Chart-2.4.6-r1/work/Chart-2.4.6/blib/lib/Chart/Bars.pm line 17.                                                                
BEGIN failed--compilation aborted at /var/tmp/portage/dev-perl/Chart-2.4.6-r1/work/Chart-2.4.6/blib/lib/Chart/Bars.pm line 17.                                                            
Compilation failed in require at t/bars_3.t line 3.                                                                                                                                       
BEGIN failed--compilation aborted at t/bars_3.t line 3.                                                                                                                                   
t/bars_3.t ......... Dubious, test returned 255 (wstat 65280, 0xff00)                                                                                                                     
No subtests run                                                                                                                                                                           
t/bars_4.t ......... Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at /var/tmp/portage/dev-perl/Chart-2.4.6-r1/work/Chart-2.4.6/blib/lib/Chart/Base.pm line 181.
Compilation failed in require at /var/tmp/portage/dev-perl/Chart-2.4.6-r1/work/Chart-2.4.6/blib/lib/Chart/Bars.pm line 17.                                                                
BEGIN failed--compilation aborted at /var/tmp/portage/dev-perl/Chart-2.4.6-r1/work/Chart-2.4.6/blib/lib/Chart/Bars.pm line 17.                                                            
Compilation failed in require at t/bars_4.t line 6.                                                                                                                                       
BEGIN failed--compilation aborted at t/bars_4.t line 6.                                                                                                                                   
t/bars_4.t ......... Dubious, test returned 255 (wstat 65280, 0xff00)                                                                                                                     
No subtests run
Comment 1 lee 2017-04-27 23:03:12 UTC
I'm seeing the same problem when using the module.  Here's a fix that made it work for me:


diff -u /usr/lib64/perl5/vendor_perl/5.24.1/Chart/Base.pm~ /usr/lib64/perl5/vendor_perl/5.24.1/Chart/Base.pm
--- /usr/lib64/perl5/vendor_perl/5.24.1/Chart/Base.pm~  2017-04-27 23:45:01.855043930 +0100
+++ /usr/lib64/perl5/vendor_perl/5.24.1/Chart/Base.pm   2017-04-27 23:56:37.380688140 +0100
@@ -178,7 +178,8 @@
     if ( ( ref $_[0] ) =~ /^ARRAY/ )
     {
         my $rdata = shift;
-        @data = @$rdata if defined @$rdata;
+        # @data = @$rdata if defined @$rdata;
+       @data = @$rdata if @$rdata;
     }
     elsif ( ( ref \$_[0] ) =~ /^SCALAR/ )
     {
@@ -230,7 +231,8 @@
     if ( ( ref $_[0] ) =~ /^ARRAY/ )
     {
         my $rdata = shift;
-        @data = @$rdata if defined @$rdata;
+        # @data = @$rdata if defined @$rdata;
+       @data = @$rdata if @$rdata;
     }
     elsif ( ( ref \$_[0] ) =~ /^SCALAR/ )
     {
Comment 2 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2017-06-22 05:20:38 UTC
commit:  9618519fba1cfd2da3f2322ccf153e4acf94ee5b
author:  2017-06-22 17:19:51 +1200 Kent Fredric <kentnl@gentoo.org>
commit:  2017-06-22 17:19:51 +1200 Kent Fredric <kentnl@gentoo.org>
gpg-key: E854324B1366A820

    dev-perl/Chart: Cleanup old re bug #615146

    Removing versions that are currently broken on Perl 5.22+ due to
    fatalization of `defined(@array)`
    
    Bug: https://bugs.gentoo.org/615146
    Package-Manager: Portage-2.3.6, Repoman-2.3.2


 dev-perl/Chart/Chart-2.4.6-r1.ebuild | 23 -----
 dev-perl/Chart/Manifest              |  1 -
 2 files changed, 24 deletions(-)