in reply to Re: children without inheritance
in thread children without inheritance

The point people are trying to make is that the file naming specifies nothing about the relationship between the classes.

These file layouts are all valid:

A.pm B.pm A.pm A/B.pm B.pm B/A.pm AB/A.pm AB/B.pm Foo/A.pm Foo/Bar/B.pm

It's what's inside the files that determines inheritance, not the names of the files themselves.

Include the following before you use any of your private modules:

BEGIN { push(@INC, $ENV{'HOME'} . '/lib'); }

So, for example:

#!/usr/bin/perl use strict; use warnings; BEGIN { push(@INC, $ENV{'HOME'} . '/lib'); } use Foo::A; use Foo::Bar::B; my $a = Foo::A->new(); my $b = Foo::Bar::B->new();