in reply to Re: Saving/recovering sub refs in a file
in thread Saving/recovering sub refs in a file
You can get the subroutine source from a reference using B::Deparse.
Hm. That's interesting. What I was really looking for was a way to find the string name of a sub, not the source for it. IOW, suppose I had:
Then inside my::Error::register() somehow I could convert the ref I'd been passed back into the name of the sub (in this case the string "my::Plugins::SomePlugin::myhandler").package my::Plugins::SomePlugin; sub myhandler { do_something(); } my::Error::register(\&myhandler);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Saving/recovering sub refs in a file
by Khen1950fx (Canon) on Jun 16, 2010 at 23:18 UTC |