See HTML::DOM::NodeList both for a description and the API.
There is one difference, though: If you want to create a NodeList yourself,
for whatever reason, you can call the constructor shown in the synopsis.
The subroutine has to return the entire list that the node list is supposed
to contain. The second argument is the document to which the node belongs.
If the document is modified, the node list is automatically notified, and
calls the subroutine again the next time it is accessed, to reset itself.
If you dont provide the document, the node list will never be updated
after the first time an element is accessed.