File::HomeDir::FreeDesktop - Testing and review required

Alias on 2010-01-07T10:34:41

I've just uploaded a new 0.90_01 dev release of File::HomeDir which contains long-anticipated support for the freedesktop.org specification, meaning that File::HomeDir should now return correct locations for desktop, music, pictures, and user-data directories on modern Unix systems.

If you are interested in these changes, you may want to test the new release.

Please note that this will result in a change in behaviour on many Unix systems, as your backend will automatically switch from the generic File::HomeDir::Unix to the new File::HomeDir::FreeDesktop (based on the existence of the directory /etc/xdg)


Re: File::HomeDir::FreeDesktop - Testing and revie

daxim on 2010-01-07T11:54:33

I'm glad that you are not afraid of breaking compatibility.

It is unreliable to parse user-dirs.dirs because it is a shell program! You should rely on the proper API instead, which means using the output of the xdg-user-dir executable. Compare with http://rt.cpan.org/Ticket/Attachment/674244/346764/0001-support-for-more-xdg-spe cs.patch.

/etc/xdg isn't always right

mauzo on 2010-01-09T23:08:57

The current version uses the existence of /etc/xdg to determine that we are on a Freedesktop.org system; under FreeBSD (and possibly other systems) this is incorrect. The system XDG config dir is located at /usr/local/etc/xdg, since /etc is reserved for the base system.