From fa6e2b8e0faf3976194abf887a47a87b718e26ad Mon Sep 17 00:00:00 2001 From: mauke Date: Sun, 9 Apr 2017 21:23:39 +0200 Subject: [PATCH] make deparse use Data::Dumper for constants The built-in dumper in B::Deparse doesn't handle cyclic constants (and recurses infinitely). For example: deparse: use constant FOO => do { my %x; $x{k} = \%x }; FOO This problem also occurs if you try to deparse parameter types with Function::Parameters and Types::Standard. --- lib/eval.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/eval.pl b/lib/eval.pl index e0fcc46..79f19b1 100755 --- a/lib/eval.pl +++ b/lib/eval.pl @@ -179,7 +179,7 @@ no warnings; if( $@ ) { print STDOUT "Error: $@"; return } - my $dp = B::Deparse->new("-p", "-q", "-x7"); + my $dp = B::Deparse->new("-p", "-q", "-x7", "-d"); my @out;