support constructor arguments has hashref

thanks to feedback from @shadowcat-mst++