in reply to OO Perl Baby Steps
Thanks, this is informative. I tested it out and saw that with "package pkgname;" just above the block of my parent class, I could move methods out to below the block of code and child classes could still inherit them. That's probably not a good idea. I guess the book's notation, with the package directive inside the block, is the most suggestive of the idea that the methods are specific to the class. That's probably what I'll stick with, and use 'package' statements outside of a block just for namespace (rather than OO Perl) purposes. But it's good to know about the new 5.14 syntax.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: OO Perl Baby Steps
by jeffa (Bishop) on Jun 14, 2013 at 16:57 UTC | |
by Clovis_Sangrail (Beadle) on Jun 19, 2013 at 17:14 UTC | |
by tobyink (Canon) on Jun 20, 2013 at 11:46 UTC | |
by jeffa (Bishop) on Jun 19, 2013 at 17:24 UTC | |
by Anneq (Vicar) on Jun 22, 2013 at 16:58 UTC | |
by jeffa (Bishop) on Jun 24, 2013 at 17:50 UTC | |
|