1File::KDBX::Group(3) User Contributed Perl Documentation File::KDBX::Group(3)
2
3
4
6 File::KDBX::Group - A KDBX database group
7
9 version 0.906
10
12 A group in a KDBX database is a type of object that can contain entries
13 and other groups.
14
15 There is also some metadata associated with a group. Each group in a
16 database is identified uniquely by a UUID. An entry can also have an
17 icon associated with it, and there are various timestamps. Take a look
18 at the attributes to see what's available.
19
20 A File::KDBX::Group is a subclass of File::KDBX::Object. View its
21 documentation to see other attributes and methods available on groups.
22
24 name
25 The human-readable name of the group.
26
27 notes
28 Free form text string associated with the group.
29
30 is_expanded
31 Whether or not subgroups are visible when listed for user selection.
32
33 default_auto_type_sequence
34 The default auto-type keystroke sequence, inheritable by entries and
35 subgroups.
36
37 enable_auto_type
38 Whether or not the entry is eligible to be matched for auto-typing,
39 inheritable by entries and subgroups.
40
41 enable_searching
42 Whether or not entries within the group can show up in search results,
43 inheritable by subgroups.
44
45 last_top_visible_entry
46 The UUID of the entry visible at the top of the list.
47
48 entries
49 Array of entries contained within the group.
50
51 groups
52 Array of subgroups contained within the group.
53
55 entries
56 \@entries = $group->entries;
57
58 Get an array of direct child entries within a group.
59
60 all_entries
61 \&iterator = $kdbx->all_entries(%options);
62
63 Get an File::KDBX::Iterator over entries within a group. Supports the
64 same options as "groups", plus some new ones:
65
66 • "auto_type" - Only include entries with auto-type enabled (default:
67 false, include all)
68
69 • "searching" - Only include entries within groups with searching
70 enabled (default: false, include all)
71
72 • "history" - Also include historical entries (default: false,
73 include only current entries)
74
75 add_entry
76 $entry = $group->add_entry($entry);
77 $entry = $group->add_entry(%entry_attributes);
78
79 Add an entry to a group. If $entry already has a parent group, it will
80 be removed from that group before being added to $group.
81
82 remove_entry
83 $entry = $group->remove_entry($entry);
84 $entry = $group->remove_entry($entry_uuid);
85
86 Remove an entry from a group's array of entries. Returns the entry
87 removed or "undef" if nothing removed.
88
89 groups
90 \@groups = $group->groups;
91
92 Get an array of direct subgroups within a group.
93
94 all_groups
95 \&iterator = $group->all_groups(%options);
96
97 Get an File::KDBX::Iterator over groups within a groups, deeply.
98 Options:
99
100 • "inclusive" - Include $group itself in the results (default: true)
101
102 • "algorithm" - Search algorithm, one of "ids", "bfs" or "dfs"
103 (default: "ids")
104
105 add_group
106 $new_group = $group->add_group($new_group);
107 $new_group = $group->add_group(%group_attributes);
108
109 Add a group to a group. If $new_group already has a parent group, it
110 will be removed from that group before being added to $group.
111
112 remove_group
113 $removed_group = $group->remove_group($group);
114 $removed_group = $group->remove_group($group_uuid);
115
116 Remove a group from a group's array of subgroups. Returns the group
117 removed or "undef" if nothing removed.
118
119 all_objects
120 \&iterator = $groups->all_objects(%options);
121
122 Get an File::KDBX::Iterator over objects within a group, deeply. Groups
123 and entries are considered objects, so this is essentially a
124 combination of "groups" and "entries". This won't often be useful, but
125 it can be convenient for maintenance tasks. This method takes the same
126 options as "groups" and "entries".
127
128 add_object
129 $new_entry = $group->add_object($new_entry);
130 $new_group = $group->add_object($new_group);
131
132 Add an object (either a File::KDBX::Entry or a File::KDBX::Group) to a
133 group. This is the generic equivalent of the object forms of
134 "add_entry" and "add_group".
135
136 remove_object
137 $group->remove_object($entry);
138 $group->remove_object($group);
139
140 Remove an object (either a File::KDBX::Entry or a File::KDBX::Group)
141 from a group. This is the generic equivalent of the object forms of
142 "remove_entry" and "remove_group".
143
144 effective_default_auto_type_sequence
145 $text = $group->effective_default_auto_type_sequence;
146
147 Get the value of "default_auto_type_sequence", if set, or get the
148 inherited effective default auto-type sequence of the parent.
149
150 effective_enable_auto_type
151 $text = $group->effective_enable_auto_type;
152
153 Get the value of "enable_auto_type", if set, or get the inherited
154 effective auto-type enabled value of the parent.
155
156 effective_enable_searching
157 $text = $group->effective_enable_searching;
158
159 Get the value of "enable_searching", if set, or get the inherited
160 effective searching enabled value of the parent.
161
162 is_empty
163 $bool = $group->is_empty;
164
165 Get whether or not the group is empty (has no subgroups or entries).
166
167 is_root
168 $bool = $group->is_root;
169
170 Determine if a group is the root group of its connected database.
171
172 is_recycle_bin
173 $bool = $group->is_recycle_bin;
174
175 Get whether or not a group is the recycle bin of its connected
176 database.
177
178 is_entry_templates
179 $bool = $group->is_entry_templates;
180
181 Get whether or not a group is the group containing entry template in
182 its connected database.
183
184 is_last_selected
185 $bool = $group->is_last_selected;
186
187 Get whether or not a group is the prior selected group of its connected
188 database.
189
190 is_last_top_visible
191 $bool = $group->is_last_top_visible;
192
193 Get whether or not a group is the latest top visible group of its
194 connected database.
195
196 path
197 $string = $group->path;
198
199 Get a string representation of a group's lineage. This is used as the
200 substitution value for the "{GROUP_PATH}" placeholder. See
201 "Placeholders" in File::KDBX::Entry.
202
203 For a root group, the path is simply the name of the group. For deeper
204 groups, the path is a period-separated sequence of group names between
205 the root group and $group, including $group but not the root group. In
206 other words, paths of deeper groups leave the root group name out.
207
208 Database
209 -> Root # path is "Root"
210 -> Foo # path is "Foo"
211 -> Bar # path is "Foo.Bar"
212
213 Yeah, it doesn't make much sense to me, either, but this matches the
214 behavior of KeePass.
215
216 size
217 $size = $group->size;
218
219 Get the size (in bytes) of a group, including the size of all subroups
220 and entries, if any.
221
222 depth
223 $depth = $group->depth;
224
225 Get the depth of a group within a database. The root group is at depth
226 0, its direct children are at depth 1, etc. A group not in a database
227 tree structure returns a depth of -1.
228
230 Please report any bugs or feature requests on the bugtracker website
231 <https://github.com/chazmcgarvey/File-KDBX/issues>
232
233 When submitting a bug or request, please include a test-file or a patch
234 to an existing test-file that illustrates the bug or desired feature.
235
237 Charles McGarvey <ccm@cpan.org>
238
240 This software is copyright (c) 2022 by Charles McGarvey.
241
242 This is free software; you can redistribute it and/or modify it under
243 the same terms as the Perl 5 programming language system itself.
244
245
246
247perl v5.38.0 2023-09-27 File::KDBX::Group(3)