MooX::...nfigDir(3pm)
π MooX::...nfigDir π
okay bestie, so this is a page from the User Contributed Perl Documentation set, and it's literally called MooX::...nfigDir(3pm) β yes the name is truncated like that, no I don't make the rules, the man page title just does that π
. It's about MooX::File::ConfigDir and it's gonna help u find where config files live. let's go π¦
β¨ NAME β¨
MooX::File::ConfigDir β a Moo eXtension for File::ConfigDir. that's it, that's the vibe π
πΈ SYNOPSIS πΈ
here's how u actually use it, no cap:
my App;
use Moo;
with MooX::File::ConfigDir;
1;
package main;
my $app = App->new();
$app->config_identifier('MyProject');
my @cfgdirs = @{ $app->config_dirs };
# install support
my $site_cfg_dir = $app->site_cfg_dir->[0];
my $vendor_cfg_dir = $app->site_cfg_dir->[0];
note that last pair, bestie β both site_cfg_dir calls, exactly as written. I am not touching it. it's giving "yes I copied it verbatim, that's the job" π
π DESCRIPTION π
so this module is basically ur little helper for finding configuration file locations without losing ur mind. whether u wanna use that info to find a cute spot for installing stuff, or to go looking around for some piece of settings β that heavily depends on what u actually need. it's a helper, not a life coach π«Ά
π ATTRIBUTES π
config_identifier
this one lets u deal with a global unique identifier that gets passed to the functions of File::ConfigDir. using it keeps ur config files all nicely encapsulated away from everybody else's (think "/etc/apache2" vs. "/etc" β same energy, different lane π).
"config_identifier" can be initialized either by passing it as a parameter when u construct the object, or by inheriting the default builder (_build_config_identifier). ur choice, bestie β¨
system_cfg_dir
gives u the configuration directory where the config files of the operating system live. for the deets, see "system_cfg_dir" in File::ConfigDir.
desktop_cfg_dir
gives u the configuration directory where config files of the desktop applications live. for the deets, see "desktop_cfg_dir" in File::ConfigDir.
xdg_config_dirs
this is literally just an alias for desktop_cfg_dir, existing to support the XDG Base Directory Specification <http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html> π
core_cfg_dir
gives u the configuration directory of the Perl5 core location. for the deets, see "core_cfg_dir" in File::ConfigDir.
site_cfg_dir
gives u the configuration directory of the Perl5 sitelib location. for the deets, see "site_cfg_dir" in File::ConfigDir.
vendor_cfg_dir
gives u the configuration directory of the Perl5 vendorlib location. for the deets, see "vendor_cfg_dir" in File::ConfigDir.
singleapp_cfg_dir
gives u the configuration directory of $0 if it's installed as a separate package β could be a program bundle (think TSM, Oracle DB) or an independent package combination (like via PkgSrc <http://www.pkgsrc.org/>). for the deets, see "singleapp_cfg_dir" in File::ConfigDir.
vendorapp_cfg_dir
gives u the configuration directory of $0 if it's installed as a separate package via a vendor installation, e.g. PkgSrc <http://www.pkgsrc.org/> or Homebrew <https://brew.sh/>. for the deets, see "vendorapp_cfg_dir" in File::ConfigDir.
local_cfg_dir
returns the configuration directory for distribution independent, 3rd party applications. for the deets, see "local_cfg_dir" in File::ConfigDir.
locallib_cfg_dir
gives u the configuration directory of the Perl5 local::lib environment location. for the deets, see "locallib_cfg_dir" in File::ConfigDir.
here_cfg_dir
gives u the path for the "etc" directory sitting right below the current working directory. for the deets, see "here_cfg_dir" in File::ConfigDir.
user_cfg_dir
gives u the user's home folder, using File::HomeDir. for the deets, see "user_cfg_dir" in File::ConfigDir.
xdg_config_home
returns the user configuration directory for desktop applications. for the deets, see "xdg_config_home" in File::ConfigDir.
config_dirs
tries to get all the available configuration directories as described above, and returns the ones that actually exist and are readable. for the deets, see "config_dirs" in File::ConfigDir. this is the main character of the attribute list, ngl π
π AUTHOR π
Jens Rehsack, "<rehsack at cpan.org>" β iconic, we stan π«Ά
π BUGS π
please report any bugs or feature requests to "bug-MooX-File-ConfigDir at rt.cpan.org", or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=MooX-File-ConfigDir>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. mutual notif system fr fr π₯
π¦ SUPPORT π¦
u can find documentation for this module with the perldoc command, like so:
perldoc MooX::File::ConfigDir
u can also go looking for info at:
- RT: CPAN's request tracker
<http://rt.cpan.org/NoAuth/Bugs.html?Dist=MooX-File-ConfigDir>
- AnnoCPAN: Annotated CPAN documentation
<http://annocpan.org/dist/MooX-File-ConfigDir>
- CPAN Ratings
<http://cpanratings.perl.org/m/MooX-File-ConfigDir>
- Search CPAN
<http://search.cpan.org/dist/MooX-File-ConfigDir/>
π LICENSE AND COPYRIGHT π
Copyright 2013-2020 Jens Rehsack.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
and that's the whole thing bestie, we ate and left no crumbs π β¨
sign-off time, because this page came from perl v5.32.1 and it's dated 2021-09-12, filed under MooX::...nfigDir(3pm) in the User Contributed Perl Documentation. slay, go configure something πΈπ
π¦ where this page comes from
- debian bookworm: libmoox-file-configdir-perl 0.008-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libmoox-file-configdir-perl 0.008-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libmoox-file-configdir-perl 0.008-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libmoox-file-configdir-perl 0.008-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libmoox-file-configdir-perl 0.008-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libmoox-file-configdir-perl 0.008-1 Β· 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