in reply to Re^2: What is method () ?
in thread What is method () ?
I don't know the context that TheDamian wrote that in, but I would consider it to be misleading as posted here.
When you have a single package declared in a file there is no need for the braces. The file is a single enclosing lexical scope so the braces are unnecessary, and even possibly confusing.
OTOH, when you have a mutliple packages declared in a file then you should use the braces as it enforces lexical seperation between the package implementations. But the thing is you probably should put the package declaration inside of the braces and not outside.
But that leads to the question of why you would put mutliple packages in a single file. I know of a few reasons to do so, but IME its rare that they come up.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: What is method () ?
by Perl Mouse (Chaplain) on Oct 06, 2005 at 08:31 UTC | |
by demerphq (Chancellor) on Oct 06, 2005 at 08:44 UTC |