develooper Front page | perl.perl5.porters | Postings from September 2009

[PATCH] when(scalar)

Thread Next
Joshua ben Jore
September 28, 2009 16:41
[PATCH] when(scalar)
Message ID:
Applied to blead

commit 5341b2b7ab11bc31f63ac7a675e74106418d0661
Author: Josh ben Jore <>
Date:   Wed Sep 23 15:35:14 2009 -0700

    Fix when( scalar ... ) bug

    looks_like_bool should look past scalar(). Prior to this fix, saying
    scalar() caused the when() argument to be /not/ a boolean even if it
    reasonably was. Perhaps something like: when( scalar /$re/ ). I don't
    know any natural way someone is doing to use when(scalar ...) but it
    certainly seems like it was mistakenly left out.

 op.c          |    4 ++++
 t/op/switch.t |   11 ++++++++++-
 2 files changed, 14 insertions(+), 1 deletions(-)

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About