1Test::Smoke::Syncer::SnUaspesrhoCto(n3t)ributed Perl DocTuemsetn:t:aStmiookne::Syncer::Snapshot(3)
2
3
4
6 This handles syncing from a snapshot with the Net::FTP module. It
7 should only be visible from the "parent-package" so no direct user-
8 calls on this.
9
10 Test::Smoke::Syncer::Snapshot->new( %args )
11 This crates the new object. Keys for %args:
12
13 * ddir: destination directory ( ./perl-current )
14 * server: the server to get the snapshot from ( public.activestate.com )
15 * sdir: server directory ( /pub/apc/perl-current-snap )
16 * snapext: the extension used for snapdhots ( tgz )
17 * tar: howto untar ( Archive::Tar or 'gzip -d -c %s | tar x -' )
18 * v: verbose
19
20 $syncer->sync( )
21 Make a connection to the ftp server, change to the {sdir} directory.
22 Get the list of snapshots ("/^perl@\d+\.tgz$/") and determin the
23 highest patchlevel. Fetch this file. Remove the current source-tree
24 and extract the snapshot.
25
26 $syncer->_fetch_snapshot( )
27 _fetch_snapshot() checks to see if "$self->{server} =~ m|^https?://| &&
28 $self->{sfile}". If so let LWP::Simple do the fetching else do the FTP
29 thing.
30
31 $syncer->_fetch_snapshot_HTTP( )
32 _fetch_snapshot_HTTP() simply invokes LWP::Simple::mirror().
33
34 __find_snap_name( $ftp, $snapext[, $verbose] )
35 [Not a method!]
36
37 Get a list with all the perl@\d+ files, use an ST to sort these and
38 return the one with the highes number.
39
40 $syncer->_extract_snapshot( )
41 _extract_snapshot() checks the tar attribute to find out how to extract
42 the snapshot. This could be an external command or the
43 Archive::Tar/Comperss::Zlib modules.
44
45 $syncer->_extract_with_Archive_Tar( )
46 _extract_with_Archive_Tar() uses the Archive::Tar and Compress::Zlib
47 modules to extract the snapshot. (This tested verry slow on my Linux
48 box!)
49
50 $syncer->_extract_with_external( )
51 _extract_with_external() uses "$self->{tar}" as a sprintf() template to
52 build a command. Yes that might be dangerous!
53
54 __vms_untargz( $untargz, $tgzfile, $verbose )
55 Gunzip and extract the archive in $tgzfile using a small DCL script
56
57 $syncer->patch_a_snapshot( $patch_number )
58 patch_a_snapshot() tries to fetch all the patches between $patch_number
59 and "perl-current" and apply them. This requires a working patch
60 program.
61
62 You should pass this extra information to
63 "Test::Smoke::Syncer::Snapshot->new()":
64
65 * patchup: should we do this? ( 0 )
66 * pserver: which FTP server? ( public.activestate.com )
67 * pdir: directory ( /pub/apc/perl-current-diffs )
68 * unzip: ( gzip ) [ Compress::Zlib ]
69 * patchbin: ( patch )
70 * cleanup: remove patches after applied? ( 1 )
71
72 $syncer->_get_patches( [$patch_number] )
73 _get_patches() sets up the FTP connection and gets all patches beyond
74 $patch_number. Remember that patch numbers do not have to be
75 consecutive.
76
77 $syncer->_apply_patches( @patch_list )
78 _apply_patches() calls the patch program to apply the patch and updates
79 .patch accordingly.
80
81 @patch_list is a list of filenames of these patches.
82
83 Checks the unzip attribute to find out how to unzip the patch and uses
84 the Test::Smoke::Patcher module to apply the patch.
85
86 $syncer->_read_patch( $file )
87 _read_patch() unzips the patch and returns the contents.
88
89 $syncer->_fix_dot_patch( $new_level );
90 _fix_dot_patch() updates the .patch file with the new patch level.
91
92 __get_directory_names( [$dir] )
93 [This is not a method]
94
95 "__get_directory_names()" retruns all directory names from "$dir ||
96 cwd()". It does not look at symlinks (there should not be any in the
97 perl source-tree).
98
100 (c) 2002-2013, All rights reserved.
101
102 * Abe Timmerman <abeltje@cpan.org>
103
104 This library is free software; you can redistribute it and/or modify it
105 under the same terms as Perl itself.
106
107 See:
108
109 * <http://www.perl.com/perl/misc/Artistic.html>,
110 * <http://www.gnu.org/copyleft/gpl.html>
111
112 This program is distributed in the hope that it will be useful, but
113 WITHOUT ANY WARRANTY; without even the implied warranty of
114 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
115
116
117
118perl v5.36.0 2023-01-20 Test::Smoke::Syncer::Snapshot(3)