osiv osiv - 3 months ago 10
Perl Question

What for there is file .exists in Perl installed modules' folders?

I have installed CPAN modules some time ago. After I open a folder of module

Catalyst-Plugin-Browser
, there is a file .exists. What for is it there?

Answer

The documentation for the dir_target target in ExtUtils::MM_Any says this:

Because depending on a directory to just ensure it exists doesn't work too well (the modified time changes too often) dir_target() creates a .exists file in the created directory. It is this you should depend on.

So it's part of the mechanisms used by the CPAN module installation toolchain.

Comments