From: Jarkko Hietaniemi Date: Tue, 1 May 2001 18:39:10 +0000 (+0000) Subject: Add information about Scalar::Util::blessed. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b32b0a5d97553a28be45508a0e60a97b2bf53203;p=p5sagit%2Fp5-mst-13.2.git Add information about Scalar::Util::blessed. p4raw-id: //depot/perl@9934 --- diff --git a/pod/perlobj.pod b/pod/perlobj.pod index 7d7eee5..e466dc7 100644 --- a/pod/perlobj.pod +++ b/pod/perlobj.pod @@ -387,6 +387,15 @@ blessed object print "It's still an object\n" if UNIVERSAL::can($val, 'can'); +You can also use the C function of Scalar::Util: + + use Scalar::Util 'blessed'; + + my $blessing = blessed $suspected_object; + +C returns the name of the package the argument has been +blessed into, or C. + =item VERSION( [NEED] ) C returns the version number of the class (package). If the