in reply to Can a Perl module "inspect" itself and provide details about methods and parameters?
Sometimes you can learn about objects by dumping them:
Ish:perl -MHTTP::Tiny -MData::Dumper -le '$o=HTTP::Tiny->new;print Dumper +$o' $VAR1 = bless( { 'timeout' => 60, 'keep_alive' => 1, 'max_redirect' => 5, 'verify_SSL' => 0, 'agent' => 'HTTP-Tiny/0.070', 'no_proxy' => [] }, 'HTTP::Tiny' );
Sometimes, there's no params:perl -MHTTP::Tiny -le '$o=HTTP::Tiny->new;print "$_ = $o->{$_}" for so +rt keys %$o' agent = HTTP-Tiny/0.070 keep_alive = 1 max_redirect = 5 no_proxy = ARRAY(0x7fc821802fc8) timeout = 60 verify_SSL = 0
perl -MImage::Magick -MData::Dumper -le '$o=Image::Magick->new;print D +umper $o' $VAR1 = bless( [], 'Image::Magick' );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Can a Perl module "inspect" itself and provide details about methods and parameters?
by Fletch (Bishop) on Sep 26, 2019 at 21:04 UTC |