Dist::Build::Util − Utility functions for Dist::Build
version 0.022
use
Dist::Build::Util 'module_dir';
say module_dir('Dist::Build');
This module contains a collection of utility functions for Dist::Build. Currently it contains only sharedir functions, but in the future more functions may be added.
# Get a
distribution's shared files directory
my $dir = dist_dir('My−Distribution');
The "dist_dir" function takes a single parameter of the name of an installed (CPAN or otherwise) distribution, and locates the shared data directory created at install time for it.
Returns the directory path as a string, or dies if it cannot be located or is not readable.
This is part of the ":sharedir" export group.
# Get a module's
shared files directory
my $dir = module_dir('My::Module');
The "module_dir" function takes a single parameter of the name of an installed (CPAN or otherwise) module, and locates the shared data directory created at install time for it.
Returns the directory path as a string, or dies if it cannot be located or is not readable.
This is part of the ":sharedir" export group.
Leon Timmermans <[email protected]>
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.