NAME

OpenInteract2::Setup::CreateTemporaryLibraryDirectory - Copy package modules to a single directory tree

SYNOPSIS

my $setup = OpenInteract2::Setup->new( 'create templib' );
$setup->run();

# Force library to be created even if it already exists
my $setup = OpenInteract2::Setup->new( 'create templib' );
$setup->param( create_templib => 1 );
$setup->run();

my $files_copied = $setup->param( 'copied' );
print "Copied the following files:\n";
foreach my $file ( @{ $files_copied } ) {
    print "  $file\n";
}

DESCRIPTION

This setup action creates the temporary library directory for OpenInteract2. This directory is found under $WEBSITE_DIR/tmplib and holds the modules from all the packages in the website directory.

Since this directory can hold a few modules there are some options available to control when it gets created. By default we leave the directory as-is if it already exists and only overwrite it on demand. So if the directory exists and the refresh file does not exist (more below), no files will be copied unless the 'create_templib' parameter is set to a true value.

The refresh file is created by certain OI2 management tasks and signals that the library directory needs to be refreshed. One such task is installing a new package, the assumption being that you will only need to refresh the temporary library directory when the libraries actually change.

Once it's run you can get the list of files copied from the 'copied' parameter.

Setup Metadata

name - 'create templib'

dependencies - 'read packages'

SEE ALSO

OpenInteract2::Setup

COPYRIGHT

Copyright (c) 2005 Chris Winters. All rights reserved.

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

AUTHORS

Chris Winters <chris@cwinters.com>