This queue is for tickets about the File-HomeDir CPAN distribution.
|
Subject: | XDG Base Directory Specification |
Date: | Sat, 14 Sep 2013 10:11:35 -0500 |
To: | bugs-file-homedir [...] rt.cpan.org |
From: | Caleb Cushing <xenoterracide [...] gmail.com> |
On 2013-09-15 03:11:49, XENO wrote:
> please consider adding support for the following standard locations.
>
> http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
>
>
Actually, it *DOES* support it, its just not obvious, and its dependent on a specific system binary being present to trigger it.
The binary is called "xdg-user-dir"
If you don't have such a binary, it uses ::Unix , which uses non-xdg logic.
However, if you *DO* have such a binary, it uses ::FreeDesktop, which has all the xdg spec supported:
https://metacpan.org/source/ADAMK/File-HomeDir-1.00/lib/File/HomeDir/FreeDesktop.pm
Just this is incredibly not obvious from an end users perspective, and ... not all freedesktop systems have that binary installed. :(
I myself just today discovered one module I wrote, failed to find configuration data, because it was looking in all the wrong places.
Because for some reason, I had previously configured it in the presence of xdg-user-dir , so it use one set of paths, and then for some reason, that binary got uninstalled ( nothing in my system depended on it, so it got pruned ), resulting in File::HomeDir reverting to Unix behaviour.
Going to open a bug to request the documentation be improved with regard to this, because nothing in the docs presently indicates that will happen, only by source diving do you discover a hidden dependency that is changing behaviour.
Added a bug with our downstream to get better integration.
The most obvious place downstream are likely to notice this for future maintainers are in Makefile.PL , if you can document there that there's a soft dependency on the xdg script which all freedesktop maintainers may want to install, that would help somewhat.
As to where it should be documented in File::HomeDir that you'll need such a utility to get XDG Homedir support, the FreeDesktop module would be a minimum, and somewhere in the main File::HomeDir documentation would be good too.
You basically want to be adding things that browser viewers / perldoc viewers will be able to find by grepping for XDG , FreeDesktop, or Linux. You don't have to list the things end users should install to get the script, but if you could list a few common ones that'd go far.
Subject: | Re: [rt.cpan.org #88681] XDG Base Directory Specification |
Date: | Fri, 4 Oct 2013 09:47:19 -0500 |
To: | bug-File-HomeDir [...] rt.cpan.org |
From: | Caleb Cushing <xenoterracide [...] gmail.com> |
On 2013-10-05 03:47:33, XENO wrote:
> ultimately I think the behavior is wrong, (without source diving
> myself), if it's using the binary to actually determine where things
> are that should be documented and perhaps a "patches welcome" note to
> remove it. If it's simply a heuristic then it fails to meet the spec.
Just the really annoying thing is if you use any other heuristic, you're going to meet the ire of people who have been silently using File::HomeDir on linux, where it operates in Unix mode, for the last 4+ years, and changing anything that grossly changes configuration paths for practically everything, magically, at the drop of a hat, is going to make a lot of people mad/confused.
It wouldn't be so bad if File::HomeDir was oriented so that people who had XDG support but files in UNIX paths would still have a working system, ie: If it had been standard that File::HomeDir returns a *list* of directories instead of a singular directory, then the FreeDesktop one could return ( $XDG_PATH, $UNIX_PATH ), and underlying tools would just work.
However, it doesn't, so we need a better approach.