On Mon, Jan 15, 2001 at 12:31:17PM +0000, Simon Wistow wrote:

> Sorry to go off topic and talk about Perl briefly but I need some
> opinions about something I had an idea about when going home pissed last
> night and I'm still too hungover to decide whether I'm crack fuelled or
> not.

Yep, definitely crack fuelled, but ...

>       use Sub::ACL;
>       use Another::Module.
> 
>       my $acl = get_acl_from_somewhere(); 
>       my $userid = get_current_userid();
>       ACL::init($userid, $acl);
> 
>       my $am = new AnotherModule();
> 
>       # do_something has an entry next to this userid 
>       # in the acl we passed and so works normally
>       $am->do_something(); 
> 
>       #do_somethingelse howvere doesn't and so returns undef
>       $am->do_soemthingelse();
> 
> basically it automagically intercepts subroutine calls and checks to see
> if the current user has permissions for the subroutine and returns undef
> if you don't have access to it.  You could also extend it to variables.

Let me guess, you're thinking of adapting our Illustrious Leader's
Sub::Whateveritscalledthisweek to do this?  Sounds ... interesting.

-- 
David Cantrell | [EMAIL PROTECTED] | http://www.cantrell.org.uk/david

  Any technology distinguishable from magic is insufficiently advanced

Reply via email to