1File::Share(3) User Contributed Perl Documentation File::Share(3)
2
3
4
6 File::Share - Extend File::ShareDir to Local Libraries
7
9 use File::Share ':all';
10
11 my $dir = dist_dir('Foo-Bar');
12 my $file = dist_file('Foo-Bar', 'file.txt');
13
15 This module is a dropin replacement for File::ShareDir. It supports the
16 "dist_dir" and "dist_file" functions, except these functions have been
17 enhanced to understand when the developer's local "./share/" directory
18 should be used.
19
20 NOTE: module_dist and module_file are not yet supported, because
21 (afaik) there
22 is no well known way to populate per-module share files. This may
23 change
24 in the future. Please contact me if you know how to do this.
25
27 Module::Install has an "install_share" directive that allows you to
28 install various files associated with a distribution. By convention,
29 module authors always put these in a directory called "share/".
30 However, File::ShareDir can only find files after they have been
31 installed. This can be problematic when running development tests.
32
33 File::Share will look for a local "share" directory, if it notices that
34 the module corresponding was loaded from a development path.
35
36 Devel::Local gives you an easy way to use a bunch of source
37 repositories as though their lib and bin directories had already been
38 installed. "File::Share" lets you play along with that.
39
41 • File::ShareDir
42
44 Ingy döt Net <ingy@cpan.org>
45
47 Copyright 2011-2014. Ingy döt Net.
48
49 This program is free software; you can redistribute it and/or modify it
50 under the same terms as Perl itself.
51
52 See <http://www.perl.com/perl/misc/Artistic.html>
53
54
55
56perl v5.38.0 2023-07-20 File::Share(3)