Seems not too difficult to workaround. Write it out as NULL in the dumpfile (to preserve the format), and then reconstruct it from the CV and depth at access time.
Patch attached.
--
Paul Evans
=== modified file 'lib/Devel/MAT/Context.pm'
--- lib/Devel/MAT/Context.pm 2016-03-09 14:18:02 +0000
+++ lib/Devel/MAT/Context.pm 2016-03-16 15:24:55 +0000
@@ -1,7 +1,7 @@
# You may distribute under the terms of either the GNU General Public License
# or the Artistic License (the same terms as Perl itself)
#
-# (C) Paul Evans, 2013 -- leonerd@leonerd.org.uk
+# (C) Paul Evans, 2013-2016 -- leonerd@leonerd.org.uk
package Devel::MAT::Context;
@@ -127,6 +127,8 @@
( $self->{olddepth} ) = unpack "$df->{u32_fmt}", $bytes;
( $self->{cv_at}, $self->{args_at} ) = @$ptrs;
+
+ undef $self->{args_at} if $df->perlversion ge "5.23.8";
}
sub _load_v0_1
@@ -138,6 +140,8 @@
$self->{cv_at} = $df->_read_ptr;
$self->{args_at} = $df->_read_ptr;
+
+ undef $self->{args_at} if $df->perlversion ge "5.23.8";
}
=head2 $cv = $ctx->cv
@@ -162,7 +166,19 @@
=cut
sub cv { my $self = shift; return $self->{df}->sv_at( $self->{cv_at} ) }
-sub args { my $self = shift; return $self->{df}->sv_at( $self->{args_at} ) }
+
+sub args
+{
+ my $self = shift;
+ # Perl 5.23.8 removed blk_sub.argarray so we have to go the long way round
+ $self->{args_at} //= do {
+ my $cv = $self->cv;
+ my $args = $cv->pad( $self->depth )->elem( 0 );
+ $args->addr;
+ };
+
+ return $self->{df}->sv_at( $self->{args_at} );
+}
sub olddepth { return $_[0]->{olddepth} }
=== modified file 'lib/Devel/MAT/Dumper.xs'
--- lib/Devel/MAT/Dumper.xs 2015-10-29 20:55:45 +0000
+++ lib/Devel/MAT/Dumper.xs 2016-03-16 15:24:55 +0000
@@ -1,7 +1,7 @@
/* You may distribute under the terms of either the GNU General Public License
* or the Artistic License (the same terms as Perl itself)
*
- * (C) Paul Evans, 2013-2014 -- leonerd@leonerd.org.uk
+ * (C) Paul Evans, 2013-2016 -- leonerd@leonerd.org.uk
*/
#include "EXTERN.h"
@@ -939,7 +939,11 @@
write_u32(fh, cx->blk_sub.olddepth);
write_svptr(fh, (SV*)cx->blk_sub.cv);
+#if (PERL_REVISION == 5) && ((PERL_VERSION > 23) || (PERL_VERSION == 23 && PERL_SUBVERSION >= 8))
+ write_svptr(fh, NULL);
+#else
write_svptr(fh, CxHASARGS(cx) ? (SV*)cx->blk_sub.argarray : NULL);
+#endif
break;
}