App::KGB::Change(3pm)
π App::KGB::Change π
okay bestie, this is App::KGB::Change β a single file change, from the App::KGB family (it's the Perl manpage collection, you're in the right place π«Ά).
β¨ SYNOPSIS β¨
my $c = App::KGB::Change->new(
{ action => "M", prop_change => 1, path => "/there" } );
print $c;
my $c = App::KGB::Change->new("(M+)/there");
πΈ DESCRIPTION πΈ
So like, App::KGB::Change encapsulates a single path change coming out of a given change set (or commit, same vibe π
).
And the icon behaviour? App::KGB::Change overloads the "" operator so your change objects get a default string representation. no cap, that's the whole point π
π¦ FIELDS π¦
action(mandatory) β the action that was performed on the item. The possible values are:Mβ the path was modified.Aβ the path was added.Dβ the path was deleted.Rβ the path was replaced.
path(mandatory) β the path that was changed. yeah, that one. πprop_changeβ Boolean. Indicates that some properties of the path were changed, not the content. lowkey important distinction bestie β¨
π§ CONSTRUCTOR π§
π new ( { initial values } )
More-or-less standard constructor. It's giving "you already know what this does."
- It can take a hashref with keys that are all the field names (See ).
- Or, it can take a single string, which gets de-composed into components. πͺ
See for examples.
β METHODS β
as_string()β returns a string representation of the change. This is what the""overload uses. And the glow-up? The resulting string is suitable for feeding back into the constructor if you ever need to. circular queen π
π CLASS METHODS π
detect_common_dir("changes")
Give it an arrayref of changes (instances of APP::KGB::Change) and it detects the longest path that is common to all of them. All the changes' paths get trimmed from that common part. βοΈ
Example, fr fr:
foo/b
foo/x
foo/bar/a
would return 'foo' and the paths would be trimmed down to:
b
x
bar/a
obSESSED with how clean that is πΈ
π that's the whole page bestie, every field, every flag, every trim, no skips, no cuts π«Ά
perl v5.40.1, dated 2026-07-10 β written for App::KGB::Change. slay, go forth and log your changes π
β¨
π¦ where this page comes from
- ubuntu stonking: kgb-client 1.62-4 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms