From playing with B, I see that a
B::LOGOP object (call it "
$op") referring to either a
and operator will both return "and" upon calling
$op->name. Is it possible to determine which operator the LOGOP refers to merely by examining
I am not expert for perl internals, but
LOGOP refers to logical operator group. So I don't think you can know individual operator without examining the name. Even B::Terse displays it:
perl -MO=Terse -e '$a && $b'
.... LOGOP (0x198ad94) and UNOP (0x198adec) null  PADOP (0x198ae08) gvsv GV (0x187bb9c) *a UNOP (0x198adb4) null  PADOP (0x198add0) gvsv GV (0x187bc9c) *b