Test::Smoke::Syncer - Factory for syncer objects.
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;
At this moment we support three basic types of syncing the perl source-tree.
This method uses the rsync program with the --delete option to get your perl source-tree up to date.
--delete
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.
LWP::Simple::mirror()
rsync --delete
The snapshot tarball is handled by either tar/gzip or Archive::Tar/Compress::Zlib.
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.
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).
[ Constructor | Public ]
Initialise a new object and check all relevant arguments. It returns an object of the appropriate Test::Smoke::Syncer::* class.
[ Accessor | Public ]
config() is an interface to the package lexical %CONFIG, which holds all the default values for the new() arguments.
config()
%CONFIG
new()
With the special key all_defaults this returns a reference to a hash holding all the default values.
rsync, gzip, tar, Archive::Tar, Compress::Zlib, File::Copy, Test::Smoke::SourceTree
(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.
To install Test::Smoke, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::Smoke
CPAN shell
perl -MCPAN -e shell install Test::Smoke
For more information on module installation, please visit the detailed CPAN module installation guide.