Skip to content

Instantly share code, notes, and snippets.

@autarch
Created June 20, 2013 19:02
Show Gist options
  • Save autarch/5825623 to your computer and use it in GitHub Desktop.
Save autarch/5825623 to your computer and use it in GitHub Desktop.
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