NAME

Test::Smoke::Syncer - Factory for syncer objects.

SYNOPSIS

use Test::Smoke::Syncer;

my $type = 'rsync'; # or 'snapshot' or 'copy'
my $syncer = Test::Smoke::Syncer->new( $type => \%sync_config );
my $patch_level = $syncer->sync;

DESCRIPTION

At this moment we support three basic types of syncing the perl source-tree.

rsync

This method uses the rsync program with the --delete option to get your perl source-tree up to date.

snapshot

This method uses the Net::FTP or the LWP module to get the latest snapshot. When the server attribute starts with http:// the fetching is done by LWP::Simple::mirror(). To emulate the rsync --delete effect, the current source-tree is removed.

The snapshot tarball is handled by either tar/gzip or Archive::Tar/Compress::Zlib.

copy

This method uses the File::Copy module to copy an existing source-tree from somewhere on the system (in case rsync doesn't work), this also removes the current source-tree first.

forest

This method will sync the source-tree in one of the above basic methods. After that, it will create an intermediate copy of the master directory as hardlinks and run the regen_headers.pl script. This should yield an up-to-date source-tree. The intermadite directory is now copied as hardlinks to its final directory ({ddir}).

This can be used to change the way make distclean is run from mktest.pl (removes all files that are not in the intermediate directory, which may prove faster than traditional make distclean).

METHODS

Test::Smoke::Syncer->new( $type, \%sync_config )

[ Constructor | Public ]

Initialise a new object and check all relevant arguments. It returns an object of the appropriate Test::Smoke::Syncer::* class.

Test::Smoke::Syncer->config( $key[, $value] )

[ Accessor | Public ]

config() is an interface to the package lexical %CONFIG, which holds all the default values for the new() arguments.

With the special key all_defaults this returns a reference to a hash holding all the default values.

SEE ALSO

rsync, gzip, tar, Archive::Tar, Compress::Zlib, File::Copy, Test::Smoke::SourceTree

COPYRIGHT

(c) 2002-2013, All rights reserved.

* Abe Timmerman <abeltje@cpan.org>

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

See:

* <http://www.perl.com/perl/misc/Artistic.html>,
* <http://www.gnu.org/copyleft/gpl.html>

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.