Subject: | 'extends' sometimes tries to load modules |
The documentation for 'extends' says:
| extends 'Parent::Class';
|
| Declares base class. Multiple superclasses can be passed for multiple
| inheritance (but please use roles instead).
|
| Calling extends more than once will REPLACE your superclasses, not add to
| them like 'use base' would.
What it doesn't say: In addition to setting up inheritance, in some cases[1] it
tries to load 'Parent/Class.pm' from disk first. I find this behavior
surprising and it doesn't seem to be documented anywhere.
I think this behavior should be documented (or alternatively removed).
[1] exact logic hard to describe; see sub _load_module in Moo::_Utils