File::Spec in XS
Reimplement parts of File::Spec in XS. Mainly File::Spec::Unix methods.
The methods can be used as methods on File::Spec::Unix, as methods
inherited by File::Spec::$notunix, and as standalone functions. Quite a
lot of complexity comes from making them work in all of these roles,
without the compatibility damaging the performance of any of them.
The methods therefore need to check their invocant, using C code
where the invocant is File::Spec::Unix, and calling other methods if
it is not, so that they play nicely in composition with other methods.
The standalone function is another XS entry point, entirely unencumbered
by OO interface paraphernalia. File::Spec::Functions is modified to
pick up the separate function version.
There is new logic for File::Spec to fall back to pure Perl, in the way
that Cwd.pm already does, for XS-impaired systems.
14 files changed: