# New Ticket Created by Ingo Schwarze # Please include the string: [perl #81078] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=81078 > Hi, since Scalar::Util::reftype() seems obsolete, i suggest that the UNIVERSAL(3p) manual ought to recommend using the builtin function ref() instead. Yours, Ingo -- Ingo Schwarze <ischwarze@astaro.com> | Software Engineer Astaro GmbH & Co. KG | www.astaro.com | 76227 Karlsruhe | Germany --- lib/UNIVERSAL.pm | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/UNIVERSAL.pm b/lib/UNIVERSAL.pm index 8960462..d3d843a 100644 --- a/lib/UNIVERSAL.pm +++ b/lib/UNIVERSAL.pm @@ -201,11 +201,9 @@ a function to determine the type of a reference: $yes = isa "Foo", "Bar"; The problem is that this code will I<never> call an overridden C<isa> method in -any class. Instead, use C<reftype> from L<Scalar::Util> for the first case: +any class. Instead, use the builtin function C<ref> for the first case: - use Scalar::Util 'reftype'; - - $yes = reftype( $h ) eq "HASH"; + $yes = ref($h) eq "HASH"; and the method form of C<isa> for the second: -- 1.7.1Thread Next