AFS::PAG provides the standard PAG and token manipulation functions setpag and unlog to Perl programs as a native module. It also provides the hasafs and haspag functions to detect whether AFS is running and whether the current process is in a PAG. Unlike the more general AFS module, it will build with any recent OpenAFS, Heimdal's libkafs, or on Linux without any AFS libraries at all.