in reply to Re: converting from switch to given-when
in thread converting from switch to given-when

Precisely.

Smartmatch is easy. (Except when it isn't.)

perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
  • Comment on Re^2: converting from switch to given-when