diff options
Diffstat (limited to 'Master/tlpkg/tlperl/lib/Sub/Util.pm')
-rw-r--r-- | Master/tlpkg/tlperl/lib/Sub/Util.pm | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Master/tlpkg/tlperl/lib/Sub/Util.pm b/Master/tlpkg/tlperl/lib/Sub/Util.pm index edcc6544f6e..d7b59aebab8 100644 --- a/Master/tlpkg/tlperl/lib/Sub/Util.pm +++ b/Master/tlpkg/tlperl/lib/Sub/Util.pm @@ -15,8 +15,8 @@ our @EXPORT_OK = qw( subname set_subname ); -our $VERSION = "1.50"; -$VERSION = eval $VERSION; +our $VERSION = "1.55"; +$VERSION =~ tr/_//d; require List::Util; # as it has the XS List::Util->VERSION( $VERSION ); # Ensure we got the right XS version (RT#100863) @@ -95,8 +95,10 @@ I<Since version 1.40.> Returns the name of the given C<$code> reference, if it has one. Normal named subs will give a fully-qualified name consisting of the package and the localname separated by C<::>. Anonymous code references will give C<__ANON__> -as the localname. If a name has been set using L</set_subname>, this name will -be returned instead. +as the localname. If the package the code was compiled in has been deleted +(e.g. using C<delete_package> from L<Symbol>), C<__ANON__> will be returned as +the package name. If a name has been set using L</set_subname>, this name will be +returned instead. This function was inspired by C<sub_fullname> from L<Sub::Identify>. The remaining functions that C<Sub::Identify> implements can easily be emulated |