diotalevi has asked for the wisdom of the Perl Monks concerning the following question:
I'm at a loss about any normal way to prevent Object::Deadly from having an ISA relationship with the UNIVERSAL class. I'm trying to protect myself against polluting things like UNIVERSAL::require (just search CPAN for other UNIVERSAL:: modules). Someone else has done sub UNIVERSAL::foo {...} and I want $my_obj->foo to fail to find UNIVERSAL::foo.
I've read all of CPAN's UNIVERSAL:: modules to get their current list of defined methods and have overrridden all of those. I've also used Devel::Symdump to search for any new, unknown methods at runtime. This is all patchwork because a new method could be defined right after I've finished doing my runtime checks for unknown methods.
Help?
$obj = bless {}, 'Bar'; $obj->violation; # succeeds with UNIVERSAL::violation package Bar; # no methods package UNIVERSAL; sub violation { ... }
|
|---|