That is a strange question. The answer is inside. The hdl_start subroutine is called, from inside of the library, with the three arguments: the object, the tag & a hash of attributes (if you count that hash as one), it then sets the global $tag and $name variables. So there is no problem with your code.