Regexps in 5.11 [was Re: Perl Christmas Quiz]
Paul LeoNerd Evans
leonerd at leonerd.org.uk
Tue Dec 16 10:56:31 GMT 2008
On Fri, 12 Dec 2008 14:41:07 +0000
Nicholas Clark <nick at ccl4.org> wrote:
> regexps internally became a first class concept in 5.11
Oooh. I wonder, is that why my Devel::Refcount fails everywhere on 5.11,
with wobblies about the reference count of qr//?
E.g.
http://www.nntp.perl.org/group/perl.cpan.testers/2008/08/msg2001061.html
I have a temporary hack on this currently:
SKIP: {
if( $] >= 5.011 ) {
# Perl v5.11 seems to have odd behaviour with Regexp references. They start
# off with a refcount of 2. Not sure if this is a bug in Perl, or my
# assumption. Until P5P have worked it out, we'll skip this, but just print
# a diagnostic
diag( "On Perl $], refcount(\$refs{Regexp}) is ".refcount($refs{Regexp}) );
skip "Bleadperl", 1;
}
is( refcount($refs{Regexp}), 1, 'refcount(Regexp) is 1');
}
but I'd love to get to the bottom of it. Do you know any writings or
authoritative source on the changes?
--
Paul "LeoNerd" Evans
leonerd at leonerd.org.uk
ICQ# 4135350 | Registered Linux# 179460
http://www.leonerd.org.uk/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://london.pm.org/pipermail/london.pm/attachments/20081216/747e13db/signature.pgp
More information about the london.pm
mailing list