The 'checkout' step can have a poll true or false option. If used in a jenkinsfile P4-Jenkins respects this. If it appears in a global library, the poll false option is ignored and polling still occurs on the non poll checkout.
(1) Create a Groovy library with the 2 function. One that polls, one that does not.
(2) Create a Jenkinsfile that calls the functions. For example:
(3) Setup polling to run every minute.
(4) Submit a change in folder //depot/project1/main/...
(5) Wait 2 minutes.
(6) Build was triggered.
(7) Submit change in //depot/no-poll/...
(8) Wait 2 minutes.
(9) Buld was triggered again when it should not have been triggered.