# phpman > man > Data::Stream::Bulk::Callback(3pm)

## NAME
    [Data::Stream::Bulk::Callback](https://www.chedong.com/phpMan.php/perldoc/Data%3A%3AStream%3A%3ABulk%3A%3ACallback/markdown) - Callback based bulk iterator

## VERSION
    version 0.11

## SYNOPSIS
            [Data::Stream::Bulk::Callback](https://www.chedong.com/phpMan.php/perldoc/Data%3A%3AStream%3A%3ABulk%3A%3ACallback/markdown)->new(
                    callback => sub {
                            if ( @more_items = get_some() ) {
                                    return \@more_items;
                            } else {
                                    return; # done
                            }
                    },
            }

## DESCRIPTION
    This class provides a callback based implementation of [Data::Stream::Bulk](https://www.chedong.com/phpMan.php/perldoc/Data%3A%3AStream%3A%3ABulk/markdown).

## ATTRIBUTES
    callback
        The subroutine that is called when more items are needed.

        Should return an array reference for the next block, or a false value if there is nothing
        left.

## METHODS
    get_more
        See [Data::Stream::Bulk::DoneFlag](https://www.chedong.com/phpMan.php/perldoc/Data%3A%3AStream%3A%3ABulk%3A%3ADoneFlag/markdown).

        Reinvokes "callback".

## AUTHOR
    Yuval Kogman <<nothingmuch@woobling.org>>

## COPYRIGHT AND LICENSE
    This software is copyright (c) 2012 by Yuval Kogman.

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

