Otherwise there's no easy way to get the required information sometimes, as far as I can see. Block params are not used anyway, and passing it like this will make it available in $_.
I needed it when I wanted to use a junction as a task name (e.g. task ‘test’ | ‘t’, { … }), but still be able to see which one was used exactly. Sure, I can dive into @*ARGS but that's less than awesome.
Otherwise there's no easy way to get the required information sometimes, as far as I can see. Block params are not used anyway, and passing it like this will make it available in
$_
.I needed it when I wanted to use a junction as a task name (e.g.
task ‘test’ | ‘t’, { … }
), but still be able to see which one was used exactly. Sure, I can dive into@*ARGS
but that's less than awesome.From the top of my head: