in reply to Re^6: Trying to use App::Fatpacker
in thread Trying to use App::Fatpacker

This is perhaps a little counterintuitive for a language with lots of bracketed syntax, but the package Some::Name statement creates its own namespace and such. You can have several packages in one file without extra bracketing around them.

Replies are listed 'Best First'.
Re^8: Trying to use App::Fatpacker
by Anonymous Monk on Nov 03, 2010 at 11:01 UTC
    You can have several packages in one file without extra bracketing around them.
    but additional blocks do avoid potential name clashes of lexical variables, which are file scoped, not package scoped:

    #!/usr/bin/perl -w package X; my $name = "foo"; package Y; my $name = "bar"; __END__ "my" variable $name masks earlier declaration in same scope at...