Created
June 20, 2013 19:02
-
-
Save autarch/5825623 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Builder; | |
has input_data_provider => ( does => 'DataProvider' ); | |
has output_data_writer => ( does => 'DataWriter' ); | |
sub new { | |
# make a provider and accept | |
} | |
sub build { | |
my $self = shift; | |
while ( my $data = $self->input_data_provider->next ) { | |
$self->output_data_writer->write_data($data); | |
} | |
} | |
} | |
# %params contains parameters for both the provider & writer | |
my $builder = Builder->new(%params); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment