X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=ext%2FB%2FB.pm;h=feca2e59d6ee101811888905f1ceee0135eb3d66;hb=8ad6cd6e30dd4147303864a0fc6d2311046cabef;hp=46c834a2c4a12fc7c0b867c5227e3836667d3cc6;hpb=9d2bbe64880a61780d874de13a887a9237f604de;p=p5sagit%2Fp5-mst-13.2.git diff --git a/ext/B/B.pm b/ext/B/B.pm index 46c834a..feca2e5 100644 --- a/ext/B/B.pm +++ b/ext/B/B.pm @@ -7,7 +7,7 @@ # package B; -our $VERSION = '1.00'; +our $VERSION = '1.01'; use XSLoader (); require Exporter; @@ -18,7 +18,7 @@ require Exporter; @EXPORT_OK = qw(minus_c ppname save_BEGINs class peekop cast_I32 cstring cchar hash threadsv_names main_root main_start main_cv svref_2object opnumber - amagic_generation + amagic_generation perlstring walkoptree_slow walkoptree walkoptree_exec walksymtable parents comppadlist sv_undef compile_stats timing_info begin_av init_av end_av regex_padav); @@ -126,6 +126,11 @@ sub walkoptree_slow { } shift @parents; } + if (class($op) eq 'PMOP' && $op->pmreplroot && ${$op->pmreplroot}) { + unshift(@parents, $op); + walkoptree_slow($op->pmreplroot, $method, $level + 1); + shift @parents; + } } sub compile_stats { @@ -941,6 +946,11 @@ is only useful in a BEGIN block or else the flag is set too late. Returns a double-quote-surrounded escaped version of STR which can be used as a string in C source code. +=item perlstring(STR) + +Returns a double-quote-surrounded escaped version of STR which can +be used as a string in Perl source code. + =item class(OBJ) Returns the class of an object without the part of the classname