Subject: | CLONE_SKIP scanning shouldn't use ->can method |
Under threads, CLONE_SKIP is called for each package to check if objects should be cloned as undef. forks.pm emulates this by first calling $package->can('CLONE_SKIP') to see if the method exists. The perl internals don't use the ->can() method to check this though. If a package implements its own can method that doesn't follow expectations, the behavior of forks.pm will diverge from threads.pm.
I would recommend using UNIVERSAL::can($package, 'CLONE_SKIP') instead, as that should match the behavior that perl has for this.