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