Actually, wouldn't what you've shown here work fine if read returns an object ($data) and that object includes the other 3 functions? (Not that you can't do infinitely more with Filter::Simple or Parse::RecDescent, but you may not need infinitely more.)