As others have noted, package declarations bear no relation to the scope and scoping of lexical variables. To clear up how lexical variables and the scopes they live in behave I wrote a node entitled
Lexical scoping like a fox which I hope is of help.