I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2006-11-29 08:21:57-08 by gaetan
New argument to Restricted attribute
Hi all, A Restricted attribute (sub M :Restricted { ... }) means that a method can not be called outside the object tree hierarchy. Would it be possible to have a parameter to the Restricted attribute ? This attribute would add additionnal class being able to call this method. For example,
package ClassX; use Object::InsideOut; sub M :Restricted(ClassA) { ... } package ClassY; use Object::InsideOut(ClassX); sub toto { shift->M() # call is OK } package ClassA; use ClassX; sub titi { my $obj = ClassX->new(); $obj->M(); # call is OK } package ClassB; use ClassX; sub tutu { my $obj = ClassX->new(); $obj->M(); # would raise an OIO exception }
I encountered this modelization "problem" when using a delegation mechanism. Thanks, Gaetan
Direct Responses: 3662 | Write a response
Posted on 2006-11-29 22:05:38-08 by jdhedden in response to 3653
Re: New argument to Restricted attribute
Thanks for the suggestion. I'll work on it and post a new version of OIO soon.
Direct Responses: Write a response