in reply to Re^2: ->isn't('UNIVERSAL') - stopping UNIVERSAL pollution?
in thread ->isn't('UNIVERSAL') - stopping UNIVERSAL pollution?

I have not delved much into Object::Deadly and the pod seems a bit unclear. It seems that the intent is to mock up an object to be used in testing code that should not call any methods of the object, containers and such.

If you want no methods to be called why use an object?

package Dont_touch; sub new { my $x; \$x; } 1;
Since I don't know the underlying problem you're trying to solve, I'll shut my mouth now.

Be well,
rir

Replies are listed 'Best First'.
Re^4: ->isn't('UNIVERSAL') - stopping UNIVERSAL pollution?
by diotalevi (Canon) on Sep 06, 2006 at 12:57 UTC

    The point is to have an object that isn't used in any way either as an object or as a value, boolean, string, or number. This is useful when testing things like Carp, Data::Dump::Streamer, etc. Anything which may find itself attempting to peek inside something that may be covered in arbitrary perl magic. This is an object which is covered in magic which complains loudly if you trigger any of it.

    ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊