blessed v unblessed references

Ovid publiustemp-londonpm at
Fri May 2 11:26:07 BST 2008

--- Dirk Koopman <djk at> wrote:

> How do you safely tell whether a reference is blessed or not? When I
> say safely, I mean without the runtime aborting.

  use Scalar::Util 'blessed';

  if ( blessed $reference ) {
  else {
      # :)

OK, wee bit of a joke there.  Don't call 'dump'.  You get the idea :)


Buy the book  -
Perl and CGI  -
Personal blog -
Tech blog     -

More information about the mailing list