I have a webpage based on wordpress (which uses php). Using this, I can call a function to check what roles a user has based on their wordpress login. (using a wordpress cookie so I wouldn't have to add my own authentication scheme). I'm trying to add some additional functionality to this website and at first I thought I would just stick with PHP but the more I look at what I want to implement, the more I want to use some CPAN modules. I've also started to play with Mason (& mod_perl), thinking that might be the way to go. My question is, can I integrate Mason with wordpress?
For example, I can do this in PHP:
<?php include '../wp-config.php';
get_currentuserinfo();
if (current_user_can('read')) {
...
}?>
Here it just checks to see if the wordpress user has the 'read' role. Is there any way to call a PHP function like this from Perl or should I just figure out how to rewrite all the wordpress user checking in perl? Any help or pointers would be greatly apreciated.