If it's just a quirk then I can accept that, I was just trying to establish whether or not I missed something in the documentation (I can't find anything about not nesting subroutines). My reasoning behind doing this was not to pollute the package namespace. I am used to being able to do this in other languages (javascript).