File::...::Group(3pm)

πŸ“¦
version 0.906 Β· 4 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

✨ File::KDBX::Group ✨

okay bestie, buckle UP, because we're talking about File::KDBX::Group from the <pink>User Contributed Perl Documentation</pink> πŸ’– this is <purple>version 0.906</purple> and it's literally the little folder thing inside your KDBX database, no cap πŸ‘‘


🌸 DESCRIPTION 🌸

so a group in a KDBX database is a type of object that can contain <hotpink>entries</hotpink> and <hotpink>other groups</hotpink>. folders-in-folders energy, we love a nesting moment πŸͺ†βœ¨

there's also some <cyan>metadata</cyan> associated with a group, bestie. every single group in a database is identified uniquely by a <yellow>UUID</yellow> πŸ†”. an entry can also have an <yellow>icon</yellow> associated with it, and there are <yellow>various timestamps</yellow>. take a look at the attributes to see what's available πŸ‘€ (scroll down, they're all there, I got you)

and psa: a File::KDBX::Group is a <green>subclass</green> of File::KDBX::Object πŸ’…. go view its documentation to see the other attributes and methods available on groups, because the family tree goes deep and this girlie inherits a LOT 🧬


πŸŽ€ ATTRIBUTES πŸŽ€

πŸ¦‹ name

the human-readable name of the group. yes, it's just the name. the vibe check of the folder 🏷️

πŸ¦‹ notes

free form text string associated with the group. spill whatever you want in here, it's a text field, go feral πŸ“

πŸ¦‹ is_expanded

whether or not subgroups are visible when listed for user selection πŸ‘οΈ (folded shut or popped open, your call)

πŸ¦‹ default_auto_type_sequence

the default auto-type keystroke sequence, <blue>inheritable</blue> by entries and subgroups βŒ¨οΈπŸ’«

πŸ¦‹ enable_auto_type

whether or not the entry is eligible to be matched for auto-typing, <blue>inheritable</blue> by entries and subgroups 🎯

πŸ¦‹ enable_searching

whether or not entries within the group can show up in search results, <blue>inheritable</blue> by subgroups πŸ”

πŸ¦‹ last_top_visible_entry

the <yellow>UUID</yellow> of the entry visible at the top of the list. top of the list, main character energy, we know her πŸ‘‘

πŸ¦‹ entries

array of entries contained within the group πŸ“š

πŸ¦‹ groups

array of subgroups contained within the group πŸ—‚οΈ


πŸ’… METHODS πŸ’…

πŸ“ entries

\@entries = $group->entries;

get an array of <hotpink>direct child</hotpink> entries within a group. just the immediate babies, not the whole dynasty πŸ’–

πŸ“ all_entries

\&iterator = $kdbx->all_entries(%options);

get an File::KDBX::Iterator over entries within a group πŸŒ€. supports the same options as "groups", plus some new ones:

  • "auto_type" β€” only include entries with auto-type enabled (default: <yellow>false</yellow>, include all)
  • "searching" β€” only include entries within groups with searching enabled (default: <yellow>false</yellow>, include all)
  • "history" β€” also include historical entries (default: <yellow>false</yellow>, include only current entries)

πŸ“ add_entry

$entry = $group->add_entry($entry);
$entry = $group->add_entry(%entry_attributes);

add an entry to a group. and listen: if $entry already has a parent group, it will be <red>removed from that group</red> before being added to $group πŸ‘€ so it's a move, not a copy. periodt.

πŸ“ remove_entry

$entry = $group->remove_entry($entry);
$entry = $group->remove_entry($entry_uuid);

remove an entry from a group's array of entries. returns the entry removed or "undef" if nothing was removed β€” so check your return value, bestie, don't get ghosted by an undef 😭

πŸ“ groups

\@groups = $group->groups;

get an array of <hotpink>direct</hotpink> subgroups within a group 🧚

πŸ“ all_groups

\&iterator = $group->all_groups(%options);

get an File::KDBX::Iterator over groups within a group, <purple>deeply</purple> 🌊. options:

  • "inclusive" β€” include $group itself in the results (default: <yellow>true</yellow>)
  • "algorithm" β€” search algorithm, one of "ids", "bfs" or "dfs" (default: "ids")

πŸ“ add_group

$new_group = $group->add_group($new_group);
$new_group = $group->add_group(%group_attributes);

add a group to a group πŸͺ† (yes, groups in groups, that's the whole bit). if $new_group already has a parent group, it will be <red>removed from that group</red> before being added to $group.

πŸ“ remove_group

$removed_group = $group->remove_group($group);
$removed_group = $group->remove_group($group_uuid);

remove a group from a group's array of subgroups. returns the group removed or "undef" if nothing was removed βœ‚οΈ

πŸ“ all_objects

\&iterator = $groups->all_objects(%options);

get an File::KDBX::Iterator over objects within a group, deeply. groups and entries are both considered <cyan>objects</cyan>, so this is essentially a combination of "groups" and "entries" 🧬✨. this won't often be useful, but it can be convenient for <purple>maintenance tasks</purple>. this method takes the same options as "groups" and "entries".

πŸ“ add_object

$new_entry = $group->add_object($new_entry);
$new_group = $group->add_object($new_group);

add an object (either a File::KDBX::Entry or a File::KDBX::Group) to a group. this is the <green>generic equivalent</green> of the object forms of "add_entry" and "add_group" 🫢

πŸ“ remove_object

$group->remove_object($entry);
$group->remove_object($group);

remove an object (either a File::KDBX::Entry or a File::KDBX::Group) from a group. this is the <green>generic equivalent</green> of the object forms of "remove_entry" and "remove_group" 🫢

πŸ“ effective_default_auto_type_sequence

$text = $group->effective_default_auto_type_sequence;

get the value of "default_auto_type_sequence", if set, or get the <blue>inherited</blue> effective default auto-type sequence of the parent 🧬

πŸ“ effective_enable_auto_type

$text = $group->effective_enable_auto_type;

get the value of "enable_auto_type", if set, or get the <blue>inherited</blue> effective auto-type enabled value of the parent 🧬

πŸ“ effective_enable_searching

$text = $group->effective_enable_searching;

get the value of "enable_searching", if set, or get the <blue>inherited</blue> effective searching enabled value of the parent 🧬

πŸ“ is_empty

$bool = $group->is_empty;

get whether or not the group is empty (has no subgroups or entries). an empty folder can still be iconic, ok πŸ•³οΈβœ¨

πŸ“ is_root

$bool = $group->is_root;

determine if a group is the <hotpink>root group</hotpink> of its connected database πŸ‘‘ the mother of all folders.

πŸ“ is_recycle_bin

$bool = $group->is_recycle_bin;

get whether or not a group is the <hotpink>recycle bin</hotpink> of its connected database πŸ—‘οΈ

πŸ“ is_entry_templates

$bool = $group->is_entry_templates;

get whether or not a group is the group containing <hotpink>entry template</hotpink> in its connected database πŸ“‹

πŸ“ is_last_selected

$bool = $group->is_last_selected;

get whether or not a group is the <hotpink>prior selected group</hotpink> of its connected database πŸ•°οΈ (the one you were last hanging out in)

πŸ“ is_last_top_visible

$bool = $group->is_last_top_visible;

get whether or not a group is the <hotpink>latest top visible group</hotpink> of its connected database πŸ†

πŸ“ path

$string = $group->path;

get a string representation of a group's <purple>lineage</purple> 🧬. this is used as the substitution value for the "{GROUP_PATH}" placeholder. see "Placeholders" in File::KDBX::Entry.

for a <hotpink>root group</hotpink>, the path is simply the name of the group. for deeper groups, the path is a <yellow>period-separated</yellow> sequence of group names between the root group and $group, including $group but <red>not</red> the root group. in other words, paths of deeper groups <red>leave the root group name out</red>.

Database
-> Root         # path is "Root"
   -> Foo       # path is "Foo"
      -> Bar    # path is "Foo.Bar"

ngl, yeah, it doesn't make much sense to me either 😭, but this matches the behavior of <cyan>KeePass</cyan>. so we accept it, we respect it, we move on πŸ’…

πŸ“ size

$size = $group->size;

get the <purple>size</purple> (in bytes) of a group, including the size of all subgroups and entries, if any πŸ“ (yes, "subroups" β€” that's the original spelling, I'm just the messenger 🫑)

πŸ“ depth

$depth = $group->depth;

get the depth of a group within a database. the <hotpink>root group</hotpink> is at depth <yellow>0</yellow>, its direct children are at depth <yellow>1</yellow>, etc. a group <red>not</red> in a database tree structure returns a depth of <yellow>-1</yellow> πŸ•³οΈ (off the grid, no tree, no depth, we've all been there)


😭 BUGS 😭

please report any bugs or feature requests on the bugtracker website <https://github.com/chazmcgarvey/File-KDBX/issues> πŸ› bestie, they wanna hear from you.

when submitting a bug or request, please include a <purple>test-file</purple> or a <purple>patch to an existing test-file</purple> that illustrates the bug or desired feature. receipts!! show your work!! πŸ“Žβœ¨


πŸ‘‘ AUTHOR πŸ‘‘

Charles McGarvey <ccm@cpan.org> β€” the icon, the legend, the one who built all this 🫢


this software is copyright (c) <yellow>2022</yellow> by Charles McGarvey.

this is <green>free software</green>; you can redistribute it and/or modify it under the same terms as the <green>Perl 5 programming language system itself</green>. slay, it's free, go wild 🌸


and that's the whole page, bestie!! πŸ’– this was rendered for perl v5.40.1 on <purple>2025-05-04</purple>, and it's the good old File::...::Group(3pm) User Contributed Perl Documentation moment. mwah, go organize some folders πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from