Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re^2: OOP introspection (composition)by LanX (Saint) |
on Apr 03, 2021 at 10:07 UTC ( [id://11130763]=note: print w/replies, xml ) | Need Help?? |
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 °) which is very generally speaking and fuzzy
In Section
Seekers of Perl Wisdom
|
|