in reply to converting from switch to given-when
Try this:
given ($selection) { when ([wxID_YES]) { $self->Wx::LogStatus('You pressed: "Yes"' ) + } when ([wxID_NO]) { $self->Wx::LogStatus('You pressed: "No"' ) + } when ([wxID_CANCEL]) { $self->Wx::LogStatus('You pressed: "Cancel"') + } }
perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
In Section
Seekers of Perl Wisdom