logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

KiokuDB::Role::Scan - A role for entry scanning.

Author

       Yuval Kogman <nothingmuch@woobling.org>

Description

       This role is used by classes like KiokuDB::LinkChecker to scan the whole database and computing summary
       results.

Name

       KiokuDB::Role::Scan - A role for entry scanning.

Role Parameters

       result_class
           The class of the results.

           Will  be used when creating the results initially by calling "new" and also sets up an attribute with
           delegations.

Synopsis

           package My::Entry::Processor;
           use Moose;

           with 'KiokuDB::Role::Scan' => { result_class => "My::Entry::Processor::Results" };

           sub process_block {
               my ( $self, %args ) = @_;

               $args{results}; # intermediate results

               foreach my $entry ( @{ $args{block} } ) {

               }
           }

           my $scan = My::Entry::Processor->new(
               backend => $some_backend,
           );

           my $res = $scan->results;

           $res->foo;

           $scan->foo; # delegates to result

Version

       version 0.57

See Also