Skip Menu |

This queue is for tickets about the Safe CPAN distribution.

Report information
The Basics
Id: 77916
Status: open
Priority: 0/
Queue: Safe

People
Owner: Nobody in particular
Requestors: julian.lishev [...] imperia.bg
Cc:
AdminCc:

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



Subject: Can't locate loadable object for module main::Tie::Hash::NamedCapture
Date: Wed, 20 Jun 2012 12:42:46 +0300
To: bug-Safe [...] rt.cpan.org
From: Julian Lishev <julian.lishev [...] imperia.bg>
Snippet to demonstrate the bug: #!/usr/bin/perl use strict; BEGIN { use Safe; my $safe = Safe->new; } use English; # or just ... # *+; In Perl 5.14 Tie::Hash::NamedCapture is loaded dynamically (see perldelta for 5.14). Probably this is the change that affects this bug: "The bulk of the |Tie::Hash::NamedCapture| module used to be in the Perl core. It has now been moved to an XS module to reduce overhead for programs that do not use |%+| or |%-| ." The fix for this issue is just to access *+ before calling Safe->new: use Safe; *+; my $safe = Safe->new; This bug was reproduced on: Ubuntu 11.04, Perl 5.14.2 and Windows 7 SP1, ActiveState Perl 5.14.2
I can also reproduce the bug as follows: use Safe; my $s = Safe->new; $s->reval( ' "target" =~ m/(?<t>target)/; $+{t}; ' ); In other words, any use of the named capture special variables will trigger the error.