minimalist
minimalist copied to clipboard
Workaround for given-when bug
On perl v5.36 I ran into a bug that took me a while to track down. The given() construct erases its argument after mixing the if statements with the when() statements.
I don't expect you want to accept this pull request as-is (there's probably a more elegant way to do it), but I did want to send it to you in case you or other people got confused why list commands like subscribe foo fail.
I don't do much perl nowadays, but I remember back in my head that the given-when construct has some strange properties. So a rewrite using plain if-elsif would probably be the cleanest solution. I would be happy to merge a change eliminating the given-when statements.