better way for binding perl classes