in reply to Example from perlobj failing?
This is a tricky error the first time you see it.
The parent module tries to load parent classes from disk by default. Because all of your classes are in the same file, there are no A.pm, B.pm, or C.pm files to load, and that require fails. You can get around this with:
use parent -norequire, 'A'; # and later use parent -norequire, 'B';
... or you could put each class in a separate file with the appropriate name, but that's more work for this example.
Improve your skills with Modern Perl: the free book.
|
|---|