Config...WinAny(3pm)
π NAME π
Config::Find::WinAny β the behaviours that every single Win32 OS has in common, for Config::Find. It's the shared vibe, the group chat everyone's in π«Ά
β¨ SYNOPSIS β¨
# don't use Config::Find::WinAny directly
use Config::Find;
Okay bestie, read that comment again. You do not use this one directly, you let Config::Find pull it in. It's giving backstage pass, not front door π
π ABSTRACT π
It implements the features that are common to all the Win32 OS's. Like, every Windows, no exceptions, that's the whole point π
πΈ DESCRIPTION πΈ
This module implements Config::Find for Win32 OS's. That's the mission, that's the lore β¨
WARNING!!! Configuration file placement has changed on version 0.15 to be more Windows friendly (see the note below, don't skip it π).
So here's the order for config files searching⦠(and yes, the entries marked as 1b and 2b get their own note at the end, hold on)
1 ${LOCAL_APPDATA}/$name.cfg [user]
(1b /$path_to_script/Users/$user/$name.cfg [user])
2 /$path_to_script/$name.cfg [global]
UNLESS β and this is the plot twist β when $ENV{${name}_HOME} is defined. Then the whole search path situation changes toβ¦
(1b $ENV{${name}_HOME}/Users/$user/$name.cfg [user])
2 $ENV{${name}_HOME}/$name.cfg [global]
And when you're doing the "several configuration files in one directory" approach? The order is something different differentβ¦
1 ${LOCAL_APPDATA}/$dir/$name.cfg [user]
(1b /$path_to_script/Users/$user/$dir/$name.cfg [user])
2 /$path_to_script/$name.cfg [global]
(2b /$path_to_script/$dir/$name.dfg [global])
(it is also affected by the $ENV{${name}_HOME} variable, so yeah, that one keeps showing up like the main character it is π)
π¦ the note (do not skip) π¦
Entries marked as 1b were the default behaviour for versions of Config::Find until 0.14. The new behaviour is to put user application configuration data under ${LOCAL_APPDATA} as returned by Win32::GetFolderPath(CSIDL_LOCAL_APPDATA) β and if that call fails, bestie, we just use the old approach instead, no drama π
Also, global configuration files used to be stored under a new directory placed in the same directory as the script, but honestly that's unnecessary because windows apps already go in their own directory. Periodt. π
π the desktop situation π
It seems that, sometimes, ${LOCAL_APPDATA} points to the user desktop β and placing configuration files there would be obviously wrong, like, imagine π As a work around, the module will ignore ${LOCAL_APPDATA} or ${APPDATA} if they point to any place below the desktop path. Vibe check: failed, so we ignore them π«
π SEE ALSO π
Config::FindConfig::Find::Any
π AUTHOR π
Salvador FandiΓ±o GarcΓa, <sfandino@yahoo.com>
π«Ά CONTRIBUTORS π«Ά
Barbie, <barbie@missbarbell.co.uk> (some bug fixes and documentation) β ate that, no crumbs π
π COPYRIGHT AND LICENSE π
Copyright 2003-2015 by Salvador FandiΓ±o GarcΓa (sfandino@yahoo.com) Copyright 2015 by Barbie (barbie@missbarbell.co.uk)
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
And that's the whole page, bestie π§ this was Config...WinAny(3pm) from the User Contributed Perl Documentation, sitting at perl v5.36.0, dated 2022-12-07. Stan a classic, love you, bye πβ¨
π¦ where this page comes from
- debian bookworm: libconfig-find-perl 0.31-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libconfig-find-perl 0.31-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libconfig-find-perl 0.31-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libconfig-find-perl 0.31-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libconfig-find-perl 0.31-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms