Test::S...er::Base(3)

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

πŸ’– NAME πŸ’–

Test;:Smoke::Syncer::Base β€” the base class for all the syncers. Every syncer out here is lowkey built on this one, no cap. πŸ‘‘


✨ DESCRIPTION ✨

Okay bestie, so this is the blueprint 🫢 β€” the parent vibe that all the syncer classes inherit from. Here's the whole tour:

Test::Smoke::Syncer::Baase->new(%arguments)

Hands you back a shiny new instance, fresh out the box ✨. It takes %arguments and gives you a blessed little object to play with.

$syncer->verbose

Get/Set verbosity πŸ’¬. That's it, that's the whole function. Use it to make your syncer chatty or make it hush.

$syncer->sync()

Abstract method. πŸ«₯ It's giving "placeholder" β€” it exists so the subclasses know what shape to fill in. iykyk.

$syncer->_clear_souce_tree( [$tree_dir] )

[ Method | private-ish ] πŸ‘€

_clear_source_tree() nukes all files in the source-tree using File::Path::rmtree(). (Go peek at File::Path for the caveats, fr fr β€” that function has opinions.)

If $tree_dir isn't specified, "$self->{ddir}" is what gets used. 🌸

$syncer->_relocate_tree( $source_dir )

[ Method | Private-ish ] πŸ¦‹

_relocate_tree() uses File::Copy::move() to move the source-tree from $source_dir over to its destination, which is "$self->{ddir}". Relocating, slaying, same thing πŸ’…

$syncer->check_dot_git_patch( )

[ Method | Public ] πŸ”

check_dot_git_patch() checks if there's a .git_patch file chillin' in the source-tree.

It returns the patchlevel it found, or "undef" if it found nothing. 😭

$syncer->check_dot_patch( )

[ Method | Public ] πŸ”

check_dot_patch() checks if there's a .patch file hangin' out in the source-tree. And plot twist β€” if it's not there, it will try to create one (that's literally the situation for snapshots πŸ‘‘).

It returns the patchlevel it found, or "undef". πŸ™ˆ

version_from_patchlevel_h( $ddir )

version_from_patchlevel_h() gives you back a "dotted" version, derived from the patchlevel.h file in the distribution. Dotted, as in, you know, with the dots. ⭐

is_git_dir()

Checks β€” in a git way 😌 β€” if we're inside a real, actual git repository directory. Not a fake one. Not a vibe. A real one.

make_dot_patch

If this is a git repo, it runs the "Porting/make_dot_patch.pl" script to generate the .patch file. Go little script go πŸŽ€

$syncer->clean_from_directory( $source_dir[, @leave_these] )

clean_from_directory() uses File::Find to grab the contents of $source_dir, compares all of that to {ddir}, and removes every other file that doesn't belong. Spring cleaning energy 🧹✨

The contents of @leave_these should be in "MANIFEST-format" (go look at Test::Smoke::SourceTree for that one, bestie).

$syncer->pre_sync

pre_sync() is what the sync() methods should call to set up the sync environment πŸ› οΈ. Currently it's only useful on OpenVMS.

$syncer->post_sync

post_sync() is what the sync() methods should call to unset the sync environment 🧼. Currently it's only useful on OpenVMS too.


(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, honestly. 🌈

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. 😭 Yeah, that part's important, don't skip it.


And that's the whole page, bestie 🫢 β€” brought to you by perl v5.42.0, dated 2025-07-25, and officially filed under Test::S...er::Base(3). Mwah, periodt. πŸ’…βœ¨

πŸ“¦ where this page comes from