Re: Passing user data to request callback

Martijn Koster (m.koster@nexor.co.uk)
Tue, 28 Feb 1995 13:58:43 +0000


> I think the $magic stuff is not needed.

That'd be good, cause it's not really nice.

> Perl 5.001 implements closures which should be able to handle this
> better.  You should be able to say:

>     my $magic;
>     $rc = request(..., sub { ...; something($magic)... }, ...);

Ehr... I'm not familiar with the term 'closure', can you elaborate?
Are lexically scoped variables visible to subroutines defined in that
scope?

-- Martijn
__________
Internet: m.koster@nexor.co.uk
X-400: C=GB; A= ; P=Nexor; O=Nexor; S=koster; I=M
X-500: c=GB@o=NEXOR Ltd@cn=Martijn Koster
WWW: http://web.nexor.co.uk/mak/mak.html