in reply to Re: OOP introspection (composition)
in thread OOP introspection

could be that I totally misunderstood your question about composition as "composing" a class with roles

compare

https://perldoc.perl.org/perlootut#Roles

vs

https://perldoc.perl.org/perlootut#Composition °

In case you meant the latter:

This is extremely difficult in dynamically typed languages.

You would of course parse the code for use of other classes and constructors named "new".

But this would only give you a fragile approximation of dependencies at best, because of all the flexibility Perl offers.

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

°) which is very generally speaking and fuzzy