Indeed, another way of doing it. However, a package declaration cannot be "lexical". It can be enclosed in a block (as you did) and then it extends to the end of the block, but it cannot be "lexical" as you can have lexical ("my") variables.Personally, I like to have the packages switched in a more explicit manner without having to check beginning and ending of blocks, but that is my personal style.
CountZero A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
| [reply] [d/l] |