in reply to Re: Re: Rebinding closures
in thread Rebinding closures

I guess you're right; I guess I didn't read carefully enough, and then only saw strings being used in your code. On the other hand, it really doesn't make sense to me to allow any replacements besides strings.

Replies are listed 'Best First'.
Re: Re: Re: Re: Rebinding closures
by diotalevi (Canon) on Dec 21, 2003 at 04:02 UTC

    Really? My original thought was to allow stuff like this.

    rebind_closure( $foo, qr/^\$Foo_.+?Bar/ => 23, sub { $_[0] eq '$bar' or $_[0] eq 'foo } => 42 );