NAME

File::ShareDir::Dist::Install - Install per-dist shared files

VERSION

version 0.07

SYNOPSIS

use File::ShareDir::Dist;
install_config_set 'Foo-Bar-Baz' => {
  key1 => 'value1';
  key2 => 'value2';
};

DESCRIPTION

This is File::ShareDir::Dist's install-time companion. Unlike File::ShareDir::Install it does not integrate with EUMM out of the box, possibly a feature or a bug depending on your point of view. Provides a simple interface for getting and setting the dist configuration at install time. The dist config is just a config.pl in the share directory that contains a hash that can be read at runtime.

FUNCTIONS

install_dir

my $dir = install_dir $dist_name;

Returns the directory for the share dir at install time. This will be of the form blib/lib/auto/share/dist/....

install

install $source_dir, $dist_name;
% perl -MFile::ShareDir::Dist= -e install $source_dir $dist_name

Install the given source directory to the dist share dir $dist_name. Can be called from Perl, or at the command-line as shown.

install_config_get

my $config = install_config_get $dist_name;

Get the config for the dist.

install_config_set

install_config_set $dist_name, $config;
install_config_set $dist_name, $key => $value;
% perl -MFile::ShareDir::Dist= -e install_config_set $dist_name $key $value

Set the config for the dist. Can be a hash, which REPLACES the existing config, a key/value pair which adds to the config. Can also be run at the command-line as shown.

AUTHOR

Author: Graham Ollis <plicease@cpan.org>

Contributors:

Yanick Champoux (yanick)

COPYRIGHT AND LICENSE

This software is copyright (c) 2017,2018 by Graham Ollis.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.