in reply to Can a Perl module "inspect" itself and provide details about methods and parameters?

Out of the box Perl provides very light weight support for OO. As with most things Perl you can use it to create pretty much whatever you need. So in this specific case it comes down to "how was Image::Magick written" and for the most part the answer is "not in Perl". The Perl code is a fairly thin wrapper around the underlying library so even in the best case introspection of the Perl code isn't going to be a great help.

But it's worse than that. Even languages that provide introspection can't tell you much about semantics. Sure, you may be able to find out about methods that can be called and maybe even about the parameters they are expecting, but there is a large gap between that an knowing what those parameters mean, or how they interact, or the order methods should be called or a huge range of other vital stuff you need to know to use an API - OO or otherwise.

You may find it more helpful to ask for help than bemoaning a lack of good documentation and trying to run an endgame around the documentation issue.

Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond
  • Comment on Re: Can a Perl module "inspect" itself and provide details about methods and parameters?

Replies are listed 'Best First'.
Re^2: Can a Perl module "inspect" itself and provide details about methods and parameters?
by stevieb (Canon) on Sep 21, 2019 at 22:52 UTC

    Good point on not all Perl code is actually written in Perl. That's definitely something that I should have clued in on considering half the "Perl" code I've written the last two years has been C, C++ and XS :)