Triggering a macro (with args) from command line?

or JavaScript for Automation (JXA).

My head is hurting enough working out all the nuances of JXA, without even thinking about perl.