Scroll to navigation

Dist::Build::Util(3pm) User Contributed Perl Documentation Dist::Build::Util(3pm)

NAME

Dist::Build::Util - Utility functions for Dist::Build

VERSION

version 0.024

SYNOPSIS

 use Dist::Build::Util 'module_dir';
 say module_dir('Dist::Build');

DESCRIPTION

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.

FUNCTIONS

dist_dir

  # 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.

module_dir

  # 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.

AUTHOR

Leon Timmermans <fawaka@gmail.com>

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.

2025-12-19 perl v5.40.1