Can't you use the $item as a hash ref? :-)
In reply to Re^3: unique identifiers for gtk2 canvas objects? by Tanktalus in thread unique identifiers for gtk2 canvas objects? by marksz