szabgab has asked for the wisdom of the Perl Monks concerning the following question:
Given a function using signatures like this:
I am looking for a way to list the variables it is expecting during run time. Using the solution from this post usinguse strict; use warnings; use 5.020; use feature 'signatures'; no warnings 'experimental::signatures'; sub hello($name, $age) { print "$name\n"; }
I managed to write some code that works for me that I can turn into a CPAN module, but I wonder if there is already one that does that and I missed it?B::Deparse->new->coderef2text(\&hello);
Back to
Seekers of Perl Wisdom