1File::ShareDir::InstallU(s3e)r Contributed Perl DocumentaFtiiloen::ShareDir::Install(3)
2
3
4

NAME

6       File::ShareDir::Install - Install shared files
7

SYNOPSIS

9           use ExtUtils::MakeMaker;
10           use File::ShareDir::Install;
11
12           install_share 'share';
13           install_share dist => 'dist-share';
14           install_share module => 'My::Module' => 'other-share';
15
16           WriteMakefile( ... );       # As you normaly would
17
18           package MY;
19           use File::ShareDir::Install qw(postamble);
20

DESCRIPTION

22       File::ShareDir::Install allows you to install read-only data files from
23       a distribution. It is a companion module to File::ShareDir, which
24       allows you to locate these files after installation.
25
26       It is a port Module::Install::Share to ExtUtils::MakeMaker with the
27       improvement of only installing the files you want; ".svn" and other
28       source-control junk will be ignored.
29

EXPORT

31   install_share
32           install_share $dir;
33           install_share dist => $dir;
34           install_share module => $module, $dir;
35
36       Causes all the files in $dir and its sub-directories.  to be installed
37       into a per-dist or per-module share directory.  Must be called before
38       WriteMakefile.
39
40       The first 2 forms are equivalent.
41
42       The files will be installed when you run "make install".
43
44       To locate the files after installation so they can be used inside your
45       module, see  File::ShareDir.
46
47           my $dir = File::ShareDir::module_dir( $module );
48
49       Note that if you make multiple calls to "install_share" on different
50       directories that contain the same filenames, the last of these calls
51       takes precedence.  In other words, if you do:
52
53           install_share 'share1';
54           install_share 'share2';
55
56       And both "share1" and "share2" contain a fill called "info", the file
57       "share2/info" will be installed into your "dist_dir()".
58
59   postamble
60       Exported into the MY package.  Only documented here if you need to
61       write your own postable.
62
63           package MY;
64           use File::ShareDir::Install;
65
66           sub postamble {
67               my $self = shift;
68               my @ret = File::ShareDir::Install::postamble( $self );
69               # ... add more things to @ret;
70               return join "\n", @ret;
71           }
72

SEE ALSO

74       File::ShareDir, Module::Install.
75

AUTHOR

77       Philip Gwyn, <gwyn-AT-cpan.org>
78
80       Copyright (C) 2009 by Philip Gwyn
81
82       This library is free software; you can redistribute it and/or modify it
83       under the same terms as Perl itself, either Perl version 5.8.8 or, at
84       your option, any later version of Perl 5 you may have available.
85
86
87
88perl v5.12.0                      2009-09-09        File::ShareDir::Install(3)
Impressum