the order is determined by Inline::CPP when it creates the XS file in folder _Inline/build. Perl headers come first
Inline::C has the PRE_HEAD Config option that enables one to place the code of one's choice *before* the perl headers.
I haven't specifically checked, but I would expect the PRE_HEAD option works also with Inline::CPP.