Have a nodetype (psuedogroup?) that allows for membership definition ala a code block rather than a bulk list. The method would simply override the inGroup and inGroupFast methods of the nodegroup.pm module.