I've created an interface to PAUSE's 06perms.txt file, which currently contains 
two classes:

PAUSE::PermissionsFile
Module::Permissions

Here's example usage:

use PAUSE::PermissionsFile;

$pp = PAUSE::PermissionsFile->new;
$mp = $pp->module_permissions('HTTP::Client');

$owner    = $mp->owner;
@comaints = $mp->co_maintainers;

print "owner   : $owner\n";
print "comaint : @comaints\n", 

Which would print:

owner   : LINC
comaint : NEILB

By default PAUSE::PermissionsFile will mirror (using HTTP::Tiny's mirror) 
06perms.txt, and then work off the local copy. You can pass a path to the 
constructor, if you've got your own local copy anyway. The module_permissions 
method returns an instance of Module::Permissions for the named module. This 
lets you get at the individual 'm', 'f', and 'c' entries for the module, but 
also provides the 'owner' concept ('m' if there is one, otherwise 'f').

I'd be happy to hear any thoughts on:
naming
design of the interface
other features you think this might need
Cheers,
Neil

Reply via email to