http://qs1969.pair.com?node_id=448004


in reply to Finding the name of the target of a coderef

This may seem simplistic, but if the sub normally takes arguments, you could just:
return '&foo' unless shift;
Or something similar. Then just dereference the reference and run the sub without arguments.