I added a "code ref" test:
sub c3 { print "Evaluating condition 3\n"; /gamma/; } while (<DATA>) { chomp; mff(qr/alpha/ => \&s1, qr/beta/ => \&s2, \&c3 => \&s3, qr/omega/ ) or print "*:$_\n"; }
The output:
*:This is 1:the alpha 1:but not 1:the omega 2:Now the beta Evaluating condition 3 2:progressing to Evaluating condition 3 3:the gamma 3:and finally *:the omega *:Did this work?
Which is what I expected.
Apparently, the "fat comma" ( => ) only quotes bare words. chromatic claims the same in the first paragraph of http://www.modernperlbooks.com/mt/2013/04/the-fat-comma-and-clarity.html.
So, => is not imposing string context on \&c3 so that doesn't get stringified.
In reply to Re^5: Multi-stage flip-flop? ( till() - proof of concept)
by RonW
in thread Multi-stage flip-flop?
by RonW
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |