in reply to Re: Rebinding closures
in thread Rebinding closures

Hash keys may only be strings while I wanted my keys to be compiled regex objects and code references. You've just coerced every rule into being strings even where it doesn't make sense.

Replies are listed 'Best First'.
Re: Re: Re: Rebinding closures
by jryan (Vicar) on Dec 20, 2003 at 02:45 UTC
    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.

      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 );