I haven't really looked at the semantic aspects of your rewrite yet, because I'm not exactly sure which advice from Higher Order Perl you're trying to follow, in particular which coderefs you want to pass to where...
As it is, it's not clear to me how the three functions are related. Is snmp_get the toplevel function? If so, how is it supposed to call the other routines (via coderefs you pass in as args?), etc. Could you elaborate a bit on how you want the new version to operate, i.e. what you want to call with which args, and what it should return (a few lines of sample code showing how you're planning to use it would help).
In reply to Re^3: Advice on transforming a sub into a re-entrant recursive-able method.
by almut
in thread Advice on transforming a sub into a re-entrant recursive-able method.
by hechz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |