> While thinking Eiffel-ish thoughts the other day, I began to wonder if
> Perl6's classes could go beyond the simple private/public/protected
> scheme by optionally allowing for a property or method to only be
> accessed by a certain set of classes.

Many times when I've used OO languages I've wished for something like this.
What I've often wanted would be standard method that is called before every
subroutine call. If that method returns false then the method that was
called is not called.  A standard set of security information is passed in.
That could get kind of expensive so the security method is only called if
the class is specifically set to use it.  Something like this:

   class Foo::Bar {
   use Class::Security::Method 'checker';

    sub checker (%meta) {
         if (some_security_check())
             {return 1}

         return 0;
    }

   }


-Miko

Reply via email to