Perl Monk, Perl Meditation | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
What problem were you trying to address when you wrote this?
My feeling is that for the effort of creating a new package (likely in its own file), and importing a module, you get to write sub foo {...} rather than foo => sub {...}, - but I don't see the syntax change as mattering much while I do see that overhead as mattering quite a bit. Furthermore rather than seeing closures as an unnecessary complication, I see them as an opportunity. You can ignore the fact that you can use closures to fill in the table. But if you need it, you have the ability to use closures to autogenerate large portions of your dispatch table. And a further hash advantage - you are allowed names that would not easy or (in some cases) legal in Perl function names. In reply to Re^4: A short, "iffy" rant
by tilly
|
|