diff options
Diffstat (limited to 'Master/tlpkg/tlperl/lib/B.pm')
-rw-r--r-- | Master/tlpkg/tlperl/lib/B.pm | 44 |
1 files changed, 38 insertions, 6 deletions
diff --git a/Master/tlpkg/tlperl/lib/B.pm b/Master/tlpkg/tlperl/lib/B.pm index 881b68b4e0e..952475db2c2 100644 --- a/Master/tlpkg/tlperl/lib/B.pm +++ b/Master/tlpkg/tlperl/lib/B.pm @@ -15,7 +15,7 @@ require Exporter; # walkoptree comes from B.xs BEGIN { - $B::VERSION = '1.42_02'; + $B::VERSION = '1.48'; @B::EXPORT_OK = (); # Our BOOT code needs $VERSION set, and will append to @EXPORT_OK. @@ -48,6 +48,7 @@ push @B::EXPORT_OK, (qw(minus_c ppname save_BEGINs @B::PVNV::ISA = qw(B::PVIV B::NV); @B::PVMG::ISA = 'B::PVNV'; @B::REGEXP::ISA = 'B::PVMG' if $] >= 5.011; +@B::INVLIST::ISA = 'B::PV' if $] >= 5.019; @B::PVLV::ISA = 'B::GV'; @B::BM::ISA = 'B::GV'; @B::AV::ISA = 'B::PVMG'; @@ -89,11 +90,13 @@ sub B::GV::SAFENAME { # The regex below corresponds to the isCONTROLVAR macro # from toke.c - $name =~ s/^([\cA-\cZ\c\\c[\c]\c?\c_\c^])/"^". - chr( utf8::unicode_to_native( 64 ^ ord($1) ))/e; + $name =~ s/^\c?/^?/ + or $name =~ s/^([\cA-\cZ\c\\c[\c]\c_\c^])/ + "^" . chr( utf8::unicode_to_native( 64 ^ ord($1) ))/e; # When we say unicode_to_native we really mean ascii_to_native, - # which matters iff this is a non-ASCII platform (EBCDIC). + # which matters iff this is a non-ASCII platform (EBCDIC). '\c?' would + # not have to be special cased, except for non-ASCII. return $name; } @@ -428,7 +431,9 @@ Returns the AV object (i.e. in class B::AV) representing END blocks. =item comppadlist -Returns the AV object (i.e. in class B::AV) of the global comppadlist. +Returns the PADLIST object (i.e. in class B::PADLIST) of the global +comppadlist. In Perl 5.16 and earlier it returns an AV object (class +B::AV). =item regex_padav @@ -1000,6 +1005,9 @@ in with the main SV flags, so this method is no longer present. =item PADLIST +Returns a B::PADLIST object under Perl 5.18 or higher, or a B::AV in +earlier versions. + =item OUTSIDE =item OUTSIDE_SEQ @@ -1067,7 +1075,7 @@ underlying C "inheritance": / \ B::LOOP B::PMOP -Access methods correspond to the underlying C structre field names, +Access methods correspond to the underlying C structure field names, with the leading "class indication" prefix (C<"op_">) removed. =head2 B::OP Methods @@ -1239,6 +1247,30 @@ Since perl 5.17.1 =back +=head2 OTHER CLASSES + +Perl 5.18 introduces a new class, B::PADLIST, returned by B::CV's +C<PADLIST> method. + +=head2 B::PADLIST Methods + +=over 4 + +=item MAX + +=item ARRAY + +A list of pads. The first one contains the names. These are currently +B::AV objects, but that is likely to change in future versions. + +=item ARRAYelt + +Like C<ARRAY>, but takes an index as an argument to get only one element, +rather than a list of all of them. + +=item REFCNT + +=back =head2 $B::overlay |