develooper Front page | perl.perl5.porters | Postings from January 2018

How do we correct 'Not a GLOB reference' errors?

Thread Next
From:
James E Keenan
Date:
January 22, 2018 02:36
Subject:
How do we correct 'Not a GLOB reference' errors?
Message ID:
20180122023612.21965.qmail@lists-nntp.develooper.com
In testing CPAN distro Type-Tiny against perl 5 blead, I get errors like 
this:

#####
t/20-unit/Type-Params/methods.t ........................... 1/?
#   Failed test 'clean operation'
#   at t/20-unit/Type-Params/methods.t line 76.
#          got: 'Not a GLOB reference at 
/home/jkeenan/.cpanm/work/1516583216.5321/Type-Tiny-1.002001/blib/lib/Types/Standard.pm 
line 36.
# '
#     expected: undef
# Looks like you failed 1 test of 4.
t/20-unit/Type-Params/methods.t ........................... Dubious, 
test returned 1 (wstat 256, 0x100)
Failed 1/4 subtests
#####

Here is the relevant part of Types::Standard:

#####
foreach my $globref (values %$stash) {
     return !!1 if *{$globref}{CODE};
}
#####

Do we have a standard operating procedure for patching code like this? 
I'd like to submit a p.r. but I don't understand the code or how to 
correct it.

Thank you very much.
Jim Keenan

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About