sub method1
{
my $self = shift;
my $docstring = "Prints information about X, Y, and Z";
# ...
}
sub help
{
my $self = shift;
my $method = shift;
# Note: The following approach does not work.
# I tried inserting the package name before the method name, i.e., $package_name::method::docstring, but that too was unsuccessful.
#
print $method::docstring, "\n";
}
Thanks.