This patch makes B::Deparse avoid to use balanced delimiters for the qr// operator. One of the corrected problems is that qr/\[\]/ is currently deparsed as qr[\[\]], which is equivalent to qr/[]/ (a syntax error). Side-effect : t/op/tr.t now deparses correctly, slowly improving the percentage of suceeding tests in 'make test.deparse'. --- ext/B/B/Deparse.pm.orig Mon Dec 17 19:33:27 2001 +++ ext/B/B/Deparse.pm Thu Dec 20 22:42:08 2001 @@ -3158,10 +3158,11 @@ sub single_delim { my($q, $default, $str) = @_; return "$default$str$default" if $default and index($str, $default) == -1; - my($succeed, $delim); - ($succeed, $str) = balanced_delim($str); - return "$q$str" if $succeed; - for $delim ('/', '"', '#') { + if ($q ne 'qr') { + (my $succeed, $str) = balanced_delim($str); + return "$q$str" if $succeed; + } + for my $delim ('/', '"', '#') { return "$q$delim" . $str . $delim if index($str, $delim) == -1; } if ($default) {Thread Next