In the Perl OOP, how can I dump all methods / fields in this class and its parent class.
my ($self) = @_;
I saw a lot of constructors as above. Then, what is @_
?
I have Java / OOP background. If your explanation can follow Java domain, it will be much easier for me to understand.
Data::Printer is a quick way to get a list of available methods in the current class:
This will print something like:
What is
@_
? See perldoc -v @_perldoc perlobj
mjd has an interesting article on introspection in Perl.
In addition, How do I list available methods on a given object or package in Perl? answers part of your question.
My preferred answer to that question uses Class::Inspector: