Test::S...::Syncer(3)

πŸ“¦
version 1.84 Β· 2 versions
, in fedora 43

πŸ’– Test::S...::Syncer β€” bestie edition πŸ’–

okay so this is Test::Smoke::Syncer, straight out of the User Contributed Perl Documentation corner of the manual-verse. she's a factory for syncer objects β€” like, a little machine that spits out the right kind of source-tree-syncing object for you. no cap. πŸŽ€


✨ NAME ✨

Test::Smoke::Syncer β€” factory for syncer objects. that's it, that's the whole vibe. she makes syncers. periodt. πŸ’…


🌸 SYNOPSIS 🌸

here's how you pull up:

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;

so you pick your $type, you hand her a \%sync_config, and she hands you back a whole object. then you call ->sync on it and get your $patch_level. iconic behaviour honestly. πŸ¦‹


🫢 DESCRIPTION 🫢

as of right now, we support three basic types of syncing the perl source-tree. (yes i said three and then there are four listed. don't look at me, i just work here. forest is built on top of the other ones, that's the tea. 😭)

πŸŽ€ rsync

this one runs the rsync program with the --delete option to get your perl source-tree all the way up to date. classic. reliable. ate.

πŸŽ€ snapshot

this one uses Net::FTP or the LWP module to grab the latest snapshot. and here's the detail bestie: when the server attribute starts with http://, the fetching gets done by LWP::Simple::mirror(). ✨

to emulate that "rsync --delete" effect, the current source-tree gets removed. like, gone. just so you know.

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

πŸŽ€ copy

this one uses the File::Copy module to copy an existing source-tree from somewhere else on the system β€” perfect for when rsync just isn't working out (it happens to the best of us πŸ’€). heads up tho: this also removes the current source-tree first. no take-backs.

πŸŽ€ forest

this one syncs the source-tree using one of the above basic methods. then, after that, it creates an intermediate copy of the master directory as hardlinks and runs the regen_headers.pl script. that should yield an up-to-date source-tree, bestie. the intermediate directory is then copied as hardlinks to its final directory ({ddir}). 🌈

this can be used to change the way make distclean is run from mktest.pl β€” it removes all files that are not in the intermediate directory, which may prove faster than the traditional make distclean. highkey a speed hack. πŸ‘‘


πŸ’œ METHODS πŸ’œ

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

[ Constructor | Public ]

initialise a new object and check all the relevant arguments. she returns an object of the appropriate Test::Smoke::Syncer::* class β€” like, the right subclass for whatever $type you asked for. it's giving matchmaker. 🫢

🧚 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. so it's the settings drawer. the vibe vault. πŸŽ€

and here's a lil easter egg: with the special key all_defaults this returns a reference to a hash holding all the default values. all of them. the whole collection. ⭐


🌟 SEE ALSO 🌟

go check out her friends, fr fr:

  • 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. slay.

see:

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. so like, she's trying her best but she promises nothing. 😭

okay that's the whole page bestie, you're all caught up πŸ’– this one was served to you by perl v5.42.0, dated 2025-07-25, from the User Contributed Perl Documentation. love that for us. go sync something. βœ¨πŸŒΈπŸ’…

πŸ“¦ where this page comes from