Skip Menu |

This queue is for tickets about the Lexical-Hints CPAN distribution.

Report information
The Basics
Id: 87377
Status: resolved
Priority: 0/
Queue: Lexical-Hints

People
Owner: Nobody in particular
Requestors: james2vegas [...] aim.com
Cc:
AdminCc:

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



Subject: push $reference instead of push @{$reference} requires Perl 5.14
Line 49 of  lib/Lexical/Hints.pm has 'push $LEXICAL_HINTS_FOR{$hint_owner}, $value;' which pushes a value onto a array reference instead of an array, this feature requires Perl 5.14, but the META info for this module requires an earlier Perl than that:

requires:
    perl:        5.01

Running make test on 5.12 throws the following:
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t

Show quoted text
#   Failed test 'use Lexical::Hints;'
#   at t/00.load.t line 4.
#     Tried to use 'Lexical::Hints'.
#     Error:  Type of arg 1 to push must be array (not hash element) at /home/cpan/.cpanm/work/1375002097.18098/Lexical-Hints-0.000003/blib/lib/Lexical/Hints.pm line 49, near "$value;"
# Compilation failed in require at (eval 4) line 2.

replacing line 49 with:
  push @{$LEXICAL_HINTS_FOR{$hint_owner}}, $value;

lets the tests pass successfully.
Subject: Re: [rt.cpan.org #87377] push $reference instead of push @{$reference} requires Perl 5.14
Date: Sun, 28 Jul 2013 06:43:35 -0700
To: bug-Lexical-Hints [...] rt.cpan.org
From: Damian Conway <damian [...] conway.org>
Thanks James. I learned a valuable lesson there: don't develop under 5.14 and then try to dumb the code down to 5.10 compatibility. Or, if I do, do it thoroughly. ;-) Patched and reuploaded. All the best, Damian