Nicolas Rochelemagne — 45 minutes 🐪
Several CORE functions can be overloaded using CORE::GLOBAL:: override, but sometimes it’s not possible and XS is the alternate option to mock some Perl OPs. You are going to learn how to mock Perl OPs in XS and replace them by some convenient Pure Perl helpers using the FileCheck operators -X.
This talk will show how it’s possible to mock PerlOps using XS and provide a convenient Pure Perl hook for each of the file check -X.
Overload::FileCheck provides a way to mock one or more file checks. It is also possible to mock stat/lstat functions using “mock_all_from_stat” and let Overload::FileCheck mock for you for any other -X checks.