I didn't find any functions to do this, but it is certainly possible with XPath:
@nodes = $node->findnodes('namespace::*');
That returns all of the namespaces in a scope visible to $node
. You can then get prefixes and URIs from the returned XML::LibXML::Node::Namespace objects returned:
@prefix_uris = map {[ $_->getLocalName, $_->getData]} @nodes;