Click here to get back home

About perl closure.

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
About perl closure. pswd 04-05-2008
Posted by pswd on April 5, 2008, 11:59 pm
Please log in for more thread options
I have little idea about what are closures for perl?
Is it just a function maker that returns a reference of subroutine?

Could anybody tell me what it is and show me some examples?

Thanks in advance!



Posted by John Bokma on April 6, 2008, 12:27 am
Please log in for more thread options

> I have little idea about what are closures for perl?
> Is it just a function maker that returns a reference of subroutine?
>
> Could anybody tell me what it is and show me some examples?

perldoc -q closure

--
John

http://johnbokma.com/perl/

Posted by xhoster on April 7, 2008, 12:34 pm
Please log in for more thread options
> I have little idea about what are closures for perl?
> Is it just a function maker that returns a reference of subroutine?

I think the thing that makes a code-ref a "closure" is that any
enclosing-scoped lexical variables appearing in them have their ref-counts
incremented, and thus can't be freed until after the closure itself is
destroyed.

>
> Could anybody tell me what it is and show me some examples?

try perldoc -q closure

Xho

--
-------------------- http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.

Similar ThreadsPosted
FAQ: What's a closure? October 19, 2004, 5:10 am
FAQ 7.12 What's a closure? March 4, 2005, 12:03 am
FAQ 7.12 What's a closure? April 13, 2005, 11:03 am
FAQ 7.12 What's a closure? June 29, 2005, 4:03 pm
FAQ 7.12 What's a closure? September 29, 2005, 10:03 pm
FAQ 7.12 What's a closure? December 21, 2005, 5:03 am
FAQ 7.12 What's a closure? August 29, 2006, 9:03 pm
FAQ 7.12 What's a closure? November 18, 2006, 9:03 pm
FAQ 7.12 What's a closure? February 27, 2007, 3:03 am
FAQ 7.12 What's a closure? August 12, 2007, 3:03 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap