XP is just a number | |
PerlMonks |
Passing a class methodby baxy77bax (Deacon) |
on Feb 10, 2018 at 15:22 UTC ( [id://1208899]=perlquestion: print w/replies, xml ) | Need Help?? |
baxy77bax has asked for the wisdom of the Perl Monks concerning the following question:
Hi, I have a problem with passing a class method. Let me give an example: Question in code (there are probably typos but I just need an example so I can study it). I could just do : But this is not what I am after. How to do this and what is the most elegant way to share methods between classes if they are not in a classical parent child relationship? (note that B inherits from A but now i need to pass a method and a variable for that method from B to A to be executed by A)
Thank you !
Back to
Seekers of Perl Wisdom
|
|