Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

file::sharedir::install(3pm) [debian man page]

File::ShareDir::Install(3pm)				User Contributed Perl Documentation			      File::ShareDir::Install(3pm)

NAME
File::ShareDir::Install - Install shared files SYNOPSIS
use ExtUtils::MakeMaker; use File::ShareDir::Install; install_share 'share'; install_share dist => 'dist-share'; install_share module => 'My::Module' => 'other-share'; WriteMakefile( ... ); # As you normaly would package MY; use File::ShareDir::Install qw(postamble); DESCRIPTION
File::ShareDir::Install allows you to install read-only data files from a distribution. It is a companion module to File::ShareDir, which allows you to locate these files after installation. It is a port Module::Install::Share to ExtUtils::MakeMaker with the improvement of only installing the files you want; ".svn" and other source-control junk will be ignored. EXPORT
install_share install_share $dir; install_share dist => $dir; install_share module => $module, $dir; Causes all the files in $dir and its sub-directories. to be installed into a per-dist or per-module share directory. Must be called before WriteMakefile. The first 2 forms are equivalent. The files will be installed when you run "make install". To locate the files after installation so they can be used inside your module, see File::ShareDir. my $dir = File::ShareDir::module_dir( $module ); Note that if you make multiple calls to "install_share" on different directories that contain the same filenames, the last of these calls takes precedence. In other words, if you do: install_share 'share1'; install_share 'share2'; And both "share1" and "share2" contain a fill called "info", the file "share2/info" will be installed into your "dist_dir()". postamble Exported into the MY package. Only documented here if you need to write your own postable. package MY; use File::ShareDir::Install; sub postamble { my $self = shift; my @ret = File::ShareDir::Install::postamble( $self ); # ... add more things to @ret; return join " ", @ret; } SEE ALSO
File::ShareDir, Module::Install. AUTHOR
Philip Gwyn, <gwyn-AT-cpan.org> COPYRIGHT AND LICENSE
Copyright (C) 2009-2011 by Philip Gwyn This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available. perl v5.12.4 2011-08-26 File::ShareDir::Install(3pm)

Check Out this Related Man Page

File::ShareDir::PAR(3pm)				User Contributed Perl Documentation				  File::ShareDir::PAR(3pm)

NAME
File::ShareDir::PAR - File::ShareDir with PAR support SYNOPSIS
use File::SharedDir::PAR ':ALL'; # exact same interface as the normal File::ShareDir: # Where are distribution-level shared data files kept $dir = dist_dir('File-ShareDir'); # Where are module-level shared data files kept $dir = module_dir('File::ShareDir'); # Find a specific file in our dist/module shared dir $file = dist_file( 'File-ShareDir', 'file/name.txt'); $file = module_file('File::ShareDir', 'file/name.txt'); # Like module_file, but search up the inheritance tree $file = class_file( 'Foo::Bar', 'file/name.txt' ); You may choose to install the "File::ShareDir::PAR" functions into "File::ShareDir" so that they become available globally. In that case, you must do the following before anybody can import functions from "File::ShareDir": use File::ShareDir::PAR 'global'; WARNING
This module contains highly experimental code. If you want to load modules from ".par" files using PAR and then access their shared directory using "File::ShareDir", you probably have no choice but to use it. But beware, here be dragons. DESCRIPTION
"File::ShareDir::PAR" provides the same functionality as File::ShareDir but tries hard to be compatible with PAR packaged applications. The problem is, that the concept of having a distribution or module specific share directory becomes a little hazy when you're loading everything from a single file. PAR uses an @INC hook to intercept any attempt to load a module. File::ShareDir uses the directory structure that is typically found in the directories that are listed in @INC for storing the shared data. In a "PAR" environment, this is not necessarily possible. When you call one of the functions that this module provides, it will take care to search in any of the currently loaded ".par" files before scanning @INC. This is the same order of preference you get for loading modules when PAR is in effect. If the path or file you are asking for is found in one of the loaded ".par" files, that containing ".par" file is extracted and the path returned will point to the extracted copy on disk. Depending on how you're using PAR, the files that are extracted this way are either cleaned up after program termination or cached for further executions. Either way, you're safe if you use the shared data as read-only data. If you write to it, your changes may be lost after the program ends. For any further usage information, including the list of exportable functions, please refer to the documentation of File::ShareDir. SUPPORT
Bugs should always be submitted via the CPAN bug tracker <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=File-ShareDir-PAR> For other issues, contact the PAR mailing list: <par@perl.org> AUTHOR
Steffen Mueller <smueller@cpan.org> The code was adapted from Adam Kennedy's work on "File::ShareDir" SEE ALSO
File::ShareDir, File::HomeDir, Module::Install, Module::Install::Share COPYRIGHT AND LICENSE
Copyright (c) 2008-2010 Steffen Mueller This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The portions of code that were copied from "File::ShareDir" are: Copyright (c) 2005, 2006 Adam Kennedy. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of the license can be found in the LICENSE file included with this module. perl v5.10.1 2011-03-08 File::ShareDir::PAR(3pm)
Man Page