package MyApp::Schema::Request; .... #%% if IN_APP_SERVER then use MyApp::SOAPClient::SAP; #%% end if #%% if IN_APP_SERVER then sub send_to_sap { } sub workflow { ... } #%% end if