1Data::Stream::Bulk::UtiUls(e3r)Contributed Perl DocumentDaattiao:n:Stream::Bulk::Util(3)
2
3
4

NAME

6       Data::Stream::Bulk::Util - Utility functions for Data::Stream::Bulk
7

SYNOPSIS

9           use Data::Stream::Bulk::Util qw(array);
10
11           use namespace::clean;
12
13           # Wrap a list in L<Data::Stream::Bulk::Array>
14           return bulk(qw(foo bar gorch baz));
15
16           # return an empty resultset
17           return nil();
18

DESCRIPTION

20       This module exports convenience functions for use with
21       Data::Stream::Bulk.
22

EXPORTS

24       Sub::Exporter is used to create the "import" routine, and all of its
25       aliasing/currying goodness is of course supported.
26
27   nil
28       Creates a new Data::Stream::Bulk::Nil object.
29
30       Takes no arguments.
31
32   bulk @items
33       Creates a new Data::Stream::Bulk::Array wrapping @items.
34
35   cat @streams
36       Concatenate several streams together.
37
38       Returns "nil" if no arguments are provided.
39
40   filter { ... } $stream
41       Calls "filter" on $stream with the provided filter.
42
43   unique $stream
44       Filter the stream to remove duplicates.
45
46       Note that memory use may potentially scale to O(k) where k is the
47       number of distinct items, because this is implemented in terms of a
48       seen hash.
49
50       In the future this will be optimized to be iterative for sorted
51       streams.
52
53       References are keyed by their refaddr (see "id" in
54       Hash::Util::FieldHash).
55

AUTHOR

57       Yuval Kogman <nothingmuch@woobling.org>
58
60       This software is copyright (c) 2010 by Yuval Kogman.
61
62       This is free software; you can redistribute it and/or modify it under
63       the same terms as the Perl 5 programming language system itself.
64
65
66
67perl v5.12.1                      2010-08-24       Data::Stream::Bulk::Util(3)
Impressum