in reply to Saving/recovering sub refs in a file
Is there a way in my::Error::register() to "look up" the string and see if it's a real sub,
(ref($s) // '') eq 'CODE'
Is there any reasonable way to make this easier? I guess I can always add the 'my::Plugin::' prefix myself, or something, but... I dunno.
It sounds like your obsession about the length of a line that will only occur once per plugin.
By the way, it could be shortened from
tomy::Error::register('my::Plugin::SomePlugin::handler')
if it's done from the module that needs registering.my::Error::register(__PACKAGE__)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Saving/recovering sub refs in a file
by madscientist (Novice) on Jun 16, 2010 at 15:24 UTC | |
by ikegami (Patriarch) on Jun 16, 2010 at 18:27 UTC | |
by madscientist (Novice) on Jun 16, 2010 at 19:42 UTC | |
by ikegami (Patriarch) on Jun 16, 2010 at 20:38 UTC | |
by madscientist (Novice) on Jun 16, 2010 at 22:30 UTC | |
|