in reply to Re^5: Who am I? Inheritance question
in thread Who am I? Inheritance question

package Scalar::Util; my $old_blessed = do { no strict 'refs'; delete ${ "Scalar::Util::blessed" }; }; sub blessed { my $val = $old_blessed->(@_); if ( defined $val && $val eq 'Ye::Olde::Proxy' ) { return 'Real::Deal'; } return $val; }

Update: Fixed bug.


My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?

Replies are listed 'Best First'.
Re^7: Who am I? Inheritance question
by diotalevi (Canon) on Mar 17, 2006 at 14:16 UTC

    Just an FYI, \&foo isn't a valid target for delete(). If your example even works, it's a bug.

    ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊