http://www.perlmonks.org?node_id=807069


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:
# File: Frobnicate.pm use warnings; use strict; package Util; . . package Frobnicate::Bar; . . package Frobnicate::Foo; our @ISA = qw/Frobnicate/; . . package Frobnicate; . . 1;
Note that, within Frobnicate.pm, ... Also, note that there is no need to use the subclass & utility classes where sub-classing behaviour is required.

Update:

The most apposite & absolutely correct) observations of both GrandFather & dsheroh have, between them, served to most ably demonstrate the...

A user level that continues to overstate my experience :-))