Michael G Schwern <schwern@pobox.com> writes:
> Consider the following... Foo is a poster-child for a strict class.
> Everything is predeclared and typed. Its entire hierarchy is rock
> solid. Someone uses Foo in their script and calls Foo->bar. They
> also use Bar, a module you installed a long time ago. Bar does this:
>
> package Bar;
> eval "sub Foo::bar { 23 }";
>
> Oh crap! All the wonderful compile-time checking we did on Foo has
> just been blown to pieces.
Well, if Damian's suggestions for strict classes in perl 5+i becomes
anything more than fiction then that eval will throw an exception.
--
Piers Cawley
www.iterative-software.com
Thread Previous
|
Thread Next