1App::KGB::Change(3)   User Contributed Perl Documentation  App::KGB::Change(3)
2
3
4

NAME

6       App::KGB::Change - a single file change
7

SYNOPSIS

9           my $c = App::KGB::Change->new(
10               { action => "M", prop_change => 1, path => "/there" } );
11
12           print $c;
13
14           my $c = App::KGB::Change->new("(M+)/there");
15

DESCRIPTION

17       App::KGB::Change encapsulates a single path change from a given change
18       set (or commit).
19
20       App::KGB::Change overloads the "" operator in order to provide a
21       default string representation of changes.
22

FIELDS

24       action (mandatory)
25           The action performed on the item. Possible values are:
26
27           M   The path was modified.
28
29           A   The path was added.
30
31           D   The path was deleted.
32
33           R   The path was replaced.
34
35       path (mandatory)
36           The path that was changed.
37
38       prop_change
39           Boolean. Indicated that some properties of the path, not the
40           content were changed.
41

CONSTRUCTOR

43   new ( { initial values } )
44       More-or-less standard constructor.
45
46       It can take a hashref with keys all the field names (See ).
47
48       Or, it can take a single string, which is de-composed into components.
49
50       See  for examples.
51

METHODS

53       as_string()
54           Return a string representation of the change. Used by the ""
55           overload. The resulting string is suitable for feeding the
56           constructor if needed.
57

CLASS METHODS

59       detect_common_dir("changes")
60           Given an arrayref of changes (instances of APP::KGB::Change),
61           detects the longest path that is common to all of them. All the
62           changes' paths are trimmed from the common part.
63
64           Example:
65
66            foo/b
67            foo/x
68            foo/bar/a
69
70           would return 'foo' and the paths would be trimmed to
71
72            b
73            x
74            bar/a
75
76
77
78perl v5.32.1                      2021-01-26               App::KGB::Change(3)
Impressum