Michael Shipper > Data-Range-Compare-Stream-4.029 > Data::Range::Compare::Stream::Iterator::Stack

Download:
Data-Range-Compare-Stream-4.029.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source  

NAME ^

Data::Range::Compare::Stream::Iterator::Stack - Walk many iterators with one interface

SYNOPSIS ^

  use Data::Range::Compare::Stream;
  use Data::Range::Compare::Stream::Iterator::File;
  use Data::Range::Compare::Stream::Iterator::Stack;

  my $stack=new Data::Range::Compare::Stream::Iterator::Stack;

  my $iterator_a=Data::Range::Compare::Stream::Iterator::File->new(
    filename=>'some_file.csv',
  );

  $stack->stack_push($iterator_a);

  my $iterator_b=Data::Range::Compare::Stream::Iterator::File->new(
    filename=>'some_file.csv',
  );

  $stack->stack_push($iterator_b);

  while($stack->has_next) {
    my $next_range=$stack->get_next;
    print $next_range,"\n";
  }

DESCRIPTION ^

Allows seamless iteration through multiple objects that implement: Data::Range::Compare::Stream::Iterator::Base. Data::Range::Compare::Stream::Iterator::Stack extends Data::Range::Compare::Stream::Iterator::Base and can be passed to another instance of itself.

OO Methods

SEE ALSO ^

Data::Range::Compare::Stream::Cookbook

AUTHOR ^

Michael Shipper

Source-Forge Project ^

As of version 0.001 the Project has been moved to Source-Forge.net

Data Range Compare https://sourceforge.net/projects/data-range-comp/

COPYRIGHT ^

Copyright 2011 Michael Shipper. All rights reserved.

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

syntax highlighting: