How to query for list of watchers for each queue from perl?

I have a reporting script that I’m porting from rt-2.0 to rt-3.4. In the
old days, I would query the database directly to get a list of all queue

my $str = $dbh->prepare( “SELECT distinct, users.emailaddress FROM users, watchers WHERE = watchers.owner AND watchers.scope = ‘Queue’ AND watchers.value = ?”);

I’ve poked around in the new code a bit, and have played with the
RT::Queues object, but I don’t see a way to get a list of watchers from

Am I headed down the wrong path?

Michael J. Carter