Dist::...d::Util(3pm)
π NAME π
okay so bestie, welcome to Dist::Build::Util β it's literally just a lil grab-bag of utility functions for Dist::Build. That's the whole vibe. You'll find this page filed under Dist::...d::Util(3pm) in the User Contributed Perl Documentation, and honestly? She's a small page but she ate. β¨
πΈ VERSION πΈ
version 0.028 π
β¨ SYNOPSIS β¨
the whole thing, in all her glory:
use Dist::Build::Util 'module_dir';
say module_dir('Dist::Build');
like. that's it. that's the entrance exam. π
π¦ DESCRIPTION π¦
So this module is a collection of utility functions for Dist::Build, periodt. Currently it's got the sharedir functions and nothing else, but the door is open β more functions may be added in the future, so don't get too comfy with the current roster. π
π FUNCTIONS π
π dist_dir
# Get a distribution's shared files directory
my $dir = dist_dir('My-Distribution');
The dist_dir function takes one single parameter: the name of an installed distribution (CPAN or otherwise, we don't gatekeep π). Then it goes and locates the shared data directory that got created at install time for that distribution.
She returns the directory path as a string. π«Ά
BUT β if it can't be located, or it's not readable, she dies. No cap, no soft launch, just death. π
This is part of the :sharedir export group, iykyk. π
π§ module_dir
# Get a module's shared files directory
my $dir = module_dir('My::Module');
The module_dir function also takes one single parameter: the name of an installed module (again, CPAN or otherwise). Same energy as her sister function β she locates the shared data directory created at install time for it.
Returns the directory path as a string. π
And again: can't locate it, or it's not readable? She dies. π
This one is also part of the :sharedir export group. Matching besties fr fr. πΈ
π AUTHOR π
Leon Timmermans <fawaka@gmail.com> β the icon, the moment, the main character who wrote this. π
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2024 by Leon Timmermans.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. π«Ά
okay that's the whole page bestie, go forth and locate your sharedir β¨
this was Dist::...d::Util(3pm) from perl v5.42.2, dated 2026-03-22 β tysm for reading, mwah πππ¦
π¦ where this page comes from
- fedora 43: perl-Dist-Build 0.028-1.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- fedora 44: perl-Dist-Build 0.028-1.fc44 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms