I don't think there's any provision in CGI.pm's new function for a coderef as argument. It won't be called, it will just be stringified and taken as a field name.
Calling new with arguments overrides GET or POST input, leaving requests unhandled. That may be confusing your idea of what's happening.
Clearly, you're looking for a callback to handle some sort of runtime condition - at least that's what your question sounds like. It's probably one of our famous X-Y questions. What are you really trying to accomplish?
After Compline,
Zaxo
In reply to Re: CGI hook
by Zaxo
in thread CGI hook
by datannen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |