That new version still doesn't pass the filename on to gen_thumb...unless I missed something. So its different because its not the same? More simply, gen_thumb is returning a subroutine with the width and heigth already set. That new routine is then passed the filename when its time to actualy generate the thumbnail. /me wonders then if closures are just another way to achieve function currying.
In reply to Re^2: CGI::Uploader: Using closures to improve a declarative interface.
by eric256
in thread CGI::Uploader: Using closures to improve a declarative interface.
by markjugg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |