Bash Script to List All Methods in a Perl Module

In the post “Dynamicly Adding a Method to a Module”, I showed how to use a perl one-liner to list all the methods in a module.

I will show how to do it in a shell script thus we can accept the module on the command line,

1
2
#!/bin/bash
perl -e "use Data::Dumper; use $1; print Dumper \%$1::"