Skip Menu |

This queue is for tickets about the QBit-WebInterface CPAN distribution.

Report information
The Basics
Id: 123754
Status: new
Priority: 0/
Queue: QBit-WebInterface

People
Owner: Nobody in particular
Requestors: 'spro^^*%*^6ut# [...] &$%*c
Cc:
AdminCc:

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



Subject: [PATCH] Compatibility with CV-in-stash optimisation
See the attached patch. Not having libidn, I can’t install the dependencies to confirm that this patch works. From the perldelta for 5.27.6: =head2 Subroutines no longer need typeglobs Perl 5.22.0 introduced an optimization allowing subroutines to be stored in packages as simple sub refs, not requiring a full typeglob (thus potentially saving large amounts of memeory). However, the optimization was flawed: it only applied to the main package. This optimization has now been extended to all packages. This may break compatibility with introspection code that looks inside stashes and expects everything in them to be a typeglob. When this optimization happens, the typeglob still notionally exists, so accessing it will cause the stash entry to be upgraded to a typeglob. The optimization does not apply to XSUBs or exported subroutines, and calling a method will undo it, since method calls cache things in typeglobs. [perl #129916] [perl #132252]
Subject: open_3NJ7z4AH.txt
diff -rup QBit-WebInterface-0.030-0/lib/QBit/WebInterface/Controller.pm QBit-WebInterface-0.030-1/lib/QBit/WebInterface/Controller.pm --- QBit-WebInterface-0.030-0/lib/QBit/WebInterface/Controller.pm 2017-11-03 13:30:40.000000000 -0700 +++ QBit-WebInterface-0.030-1/lib/QBit/WebInterface/Controller.pm 2017-11-26 16:54:23.000000000 -0800 @@ -89,7 +89,8 @@ sub import { foreach my $cmd (@{$pkg_stash->{'__CMDS__'} || []}) { my ($name) = grep { - !ref($pkg_sym_table->{$_}) + (!ref($pkg_sym_table->{$_}) + || ref($pkg_sym_table->{$_}) eq 'CODE') && defined(&{$pkg_sym_table->{$_}}) && $cmd->{'sub'} == \&{$pkg_sym_table->{$_}} }