Am 07.10.2015 um 10:24 schrieb Dave Mitchell: > > What I think we should do: > > 1. Get rid of the ~~ operator altogether, plus '~~' overloading. > > 2. Make when's behaviour entirely dependent on the *compile-time* class > of of its arg. In particular, make 'when (FOO)' have exactly the following > behaviours: > > FOO condition evaluates to > -------------- ---------------------- > literal undef !defined($_) > numeric const $_ == FOO > literal pattern $_ ~= FOO > all else $_ eq FOO > > 3. when { FOO } has condition FOO. (You typo'd =~ as ~= above) This would mean 'when (qr/.../)' becomes 'when { $_ eq qr/.../ }'. -- Lukas Mai <plokinom@gmail.com>Thread Previous | Thread Next