in reply to How to create nested class in perl?
If your aim is to create a class visible only to the enclosing class, then something along the following lines might suffice:
Note that, within Frobnicate.pm, ...# File: Frobnicate.pm use warnings; use strict; package Util; . . package Frobnicate::Bar; . . package Frobnicate::Foo; our @ISA = qw/Frobnicate/; . . package Frobnicate; . . 1;
- All classes (packages) are visible to each other.
- Only Frobnicate is accessible (& thus available as a superclass) externally.
- Frobnicate::Foo subclasses (and thus has a 'relationship' with) Frobnicate.
- Frobnicate::Bar has no 'relationship' with Frobnicate
Update:
The most apposite & absolutely correct) observations of both GrandFather & dsheroh have, between them, served to most ably demonstrate the...
- Voracity of my sig here on the monastry
- Correctness/validity of the (sometimes self-imposed) coding standards (&/or conventions) to which I have worked - my posting was purely experience based
A user level that continues to overstate my experience :-))
In Section
Seekers of Perl Wisdom