---
name: "KiokuDB::Backend::Role::Scan"
section: "3pm"
platform: "linux"
package: "libkiokudb-perl"
version: "0.57-3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/KiokuDB::Backend::Role::Scan"
---

# KiokuDB::Backend::Role::Scan(3pm)

Root set iteration

## NAME

KiokuDB::Backend::Role::Scan - Root set iteration

## VERSION

version 0.57

## SYNOPSIS

```
    with qw(KiokuDB::Backend::Role::Scan);
    sub all_entries {
        my $self = shift;
        # return all root set entries
        return Data::Stream::Bulk::Foo->new(...);
    }
```

## DESCRIPTION

This is a role for iterative scanning of all entries in a backend.

It is used for database backups, and various other tasks.

## REQUIRED METHODS

- all\_entries

  Should return a Data::Stream::Bulk stream enumerating all entries in the database.

## OPTIONAL METHODS

These method have default implementations defined in terms of `"all_entries"` but maybe overridden if there is a more optimal solution than just filtering that stream.

- root\_entries

  Should return a Data::Stream::Bulk of just the root entries.

- child\_entries

  Should return a Data::Stream::Bulk of everything but the root entries.

## AUTHOR

Yuval Kogman \<nothingmuch@woobling.org\>

## COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Yuval Kogman, Infinity Interactive.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
