Permalink
Browse files

Storable: Support 5.12 first-class REGEXP

importing 5.12 REGEXP into a old 5.10 perl not yet implemented and tested
  (REGEXP => PV + Magic)
bumped Storable format bin_minor to 8.
swapped SX_ERROR and SX_REGEXP because of baked SX_ERROR logic.

  Still has to think about the necessary support matrix
    2.22 |  2.23
    ERR  |  REG
    REG  |
    -----+------
    5.10 |  5.12
    PV+MG|  REGEXP
in almost all directions, 4*2 = 8 possibilities.
Maybe it's just better to freeze a REGEXP in the old
PV+Magic format, so that older perls with newer storable
files just work.

There are apperently two different kinds of REGEXP/pv's.
1. Standalone without a REGCOMP op pointing to the SV (without the
PMf_COMPILETIME flag), so we have no op_pmflags to pass to CALLREGCOMP,
and 2. the normal with OP, but we cannot support this. We have no association
of the SV to the upper OP, only the other way round.
Creating a standalone REGEXP does not create the necessary magic chain
correctly yet, contrary to a REGCOMP op with REGEXP SV, as done in the B::C
or Bytecode compiler.

STATUS:
make && ../../perl -I../../lib -I../../lib/auto -I. -MStorable \
  -e'$a=qr/1/;$Storable::DEBUGME=1;my $b=Storable::dclone($a);"212"=~$b;
retrieve got REGEXP(0x159a720)
Segmentation fault (core dumped)
  • Loading branch information...
Reini Urban
Reini Urban committed Apr 6, 2010
1 parent 431be7b commit e4d3d0d997767c688dde36c82708e12427770876
Showing with 381 additions and 178 deletions.
  1. +8 −0 dist/Storable/ChangeLog
  2. +173 −167 dist/Storable/Storable.pm
  3. +81 −8 dist/Storable/Storable.xs
  4. +114 −0 dist/Storable/t/regexp.t
  5. +5 −3 dist/Storable/t/st-dump.pl
View
@@ -1,3 +1,11 @@
+2010-03-31 16:14:07 Reini Urban <rurban@cpan.org>
+
+ Version 2.23
+
+ Support 5.12 first-class REGEXP
+
+ (Version 2.22 was released with 5.11.)
+
Thu Aug 6 10:55:50 IST 2009 Abhijit Menon-Sen <ams@toroid.org>
Version 2.21
Oops, something went wrong.

0 comments on commit e4d3d0d

Please sign in to comment.