Bio-GMOD

 view release on metacpan or  search on metacpan

GMOD/Admin/Update.pm  view on Meta::CPAN


=pod

=head1 NAME

Bio::GMOD::Admin::Update - Generics methods for updating a Bio::GMOD installation

=head1 SYNOPSIS

  # Update your Bio::GMOD installation
  use Bio::GMOD::Admin::Update;
  my $mod = Bio::GMOD::Admin::Update->new(-mod => 'WormBase');
  $mod->update(-version => 'WS136');

=head1 DESCRIPTION

Bio::GMOD::Admin::Update contains subroutines that simplify the maintenance
of a Bio::GMOD installation.

=head1 PUBLIC METHODS

=over 4

=item $mod = Bio::GMOD::Admin::Update->new()

The generic new() method is provided by Bio::GMOD.pm.  new() provides
the ability to override system installation paths.  If you have a
default installation for your MOD of interest, this should not be
necessary. You will not normally interact with Bio::GMOD::Admin::Update
objects, but instead with Bio::GMOD::Admin::Update::"MOD" objects.

See Bio::GMOD.pm and Bio::GMOD::Adaptor::* for a full description of
all default paths for your MOD of interest.

=item $mod->update(@options)

update() is a wrapper method that should be overriden by
Bio::GMOD::Admin::Update::"MOD" update().  The update() method should execute
all steps necessary for a basic installation, returing an array of all
components installed.

See Bio::GMOD::Admin::Update::WormBase for an example subclass.  See
bin/gmod_update_installation-wormbase.pl for a more detailed script
that relies on this subclass.

=item $mod->mirror(@options);

Generic mirroring of files or directories provided by the
Bio::GMOD::Util::Mirror module.  If no options are provided, they will
be fetched from the MOD default values stored in Bio::GMOD::Adaptor::*

Options:
 -remote_path   Relative to the ftp root, file or directory to mirror
 -local_path    Full path to the local destination directory
 -is_optional   Warn instead of dying on errors

=item $mod->prepare_tmp_dir(@options)

 Options:
 -tmp_path    full path to a temporary download directory
 -sync_to     site to synchronize to (live || dev)

Prepare the temporary directory for downloading. The temporary
directory is supplied by Bio::GMOD::Adaptor::* or can be overridden by
passing a "-tmp_path=" option.  If provided with
"-sync_to=[live|dev]", this method will prepare a temporary directory
according at "$tmp_path/$version" of the appropriate live or
development site.

=item $mod->rsync_software(@options);

Rsync the local software to a remote module. Options will be culled
from the Adaptor::MOD unless specified.

 Options:
 -module        Name of the rsync module to sync to
 -exclude       Array referene of items to exclude
 -install_root  Local dsetination path

=item $mod->check_disk_space(@options);

Check that a provided path has sufficient disk space for an install.

 Options:
 -path      Full path to inspect for space
 -required  Amount of space required for an install
 -component Symbolic name of the component being installed (for logging)

Returns true if there is sufficient space; dies with an error message
otherwise.

=item $mod->get_available_space(-path => $path);

Companion method to check_disk_space.  Returns an array consisting of
the mount point and available space for the provided path.

=item $mod->cleanup()

Delete the contents of the temporary directory following an update.
See Bio::GMOD::Admin::Update::* for how this method might affect you!

=back

=head1 BUGS

None reported.

=head1 SEE ALSO

L<Bio::GMOD>, L<Bio::GMOD::Util::CheckVersions>

=head1 AUTHOR

Todd W. Harris E<lt>harris@cshl.eduE<gt>.

Copyright (c) 2003-2005 Cold Spring Harbor Laboratory.

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

=cut



( run in 1.156 second using v1.01-cache-2.11-cpan-0bb4e1dffa6 )