modularize the perl client