It does remove the if, but it keeps the constant to maintain the behaviour.
>perl -MO=Concise,-exec,f -e"sub f { return 1 if 0 }"
main::f:
1 <;> nextstate(main 1 -e:1) v
2 <$> const[IV 0] s/SHORT
3 <1> leavesub[1 ref] K/REFC,1
-e syntax OK
Compared to:
>perl -MO=Concise,-exec,f -e"sub f { return 1 if $c }"
main::f:
1 <;> nextstate(main 1 -e:1) v
2 <#> gvsv[*c] s
3 <|> and(other->4) K/1
4 <0> pushmark s
5 <$> const[IV 1] s
6 <@> return K
7 <1> leavesub[1 ref] K/REFC,1
-e syntax OK
Note the and operator (used to implement if) is missing from the first snippet.
|