Macro for charge/overpower with weapon equip

So I have the following macro which will put me in battle stance and either overpower if I am in combat or charge if I am out of combat. As you can see it will equip my 2h for overpower.

I was wanting to know if the equip part can use a modifier, because what I would like is it to equip the 2h if I am pressing the button from battle stance and berserker stance, but to keep the shield/sword if I press the macro from defensive stance. Since if I pressing it from defensive stance, it is likely that I am tanking. Is this possible?

#showtooltip Charge
/startattack
/equip Whirlwind Axe
/cast Battle Stance
/cast [@mouseover,harm,nodead][] Charge
/cast [@mouseover,harm,nodead][] Overpower

Yes you can put a modifier on the equip line (or any of the lines for that matter)

/equip [mod] Whirlwind Axe

Defensive stance is no longer considered a stance so you can’t use that to filter your logic at this time.

Is this for Classic or Retail?