Skip to content

Instantly share code, notes, and snippets.

@tokuhirom
Created August 28, 2008 10:17
Show Gist options
  • Save tokuhirom/7698 to your computer and use it in GitHub Desktop.
Save tokuhirom/7698 to your computer and use it in GitHub Desktop.
26140 (tokuhirom 2008-08-24): my $BUILDER = do {
26140 (tokuhirom 2008-08-24): my $builder_meta = Moose::Meta::Class->create_anon_class(
26140 (tokuhirom 2008-08-24): superclass => 'Moose::Meta::Class',
26140 (tokuhirom 2008-08-24): roles => [qw(
26140 (tokuhirom 2008-08-24): HTTP::Engine::Role::RequestBuilder
26140 (tokuhirom 2008-08-24): HTTP::Engine::Role::RequestBuilder::ParseEnv
26140 (tokuhirom 2008-08-24): HTTP::Engine::Role::RequestBuilder::HTTPBody
26140 (tokuhirom 2008-08-24): )],
26140 (tokuhirom 2008-08-24): cache => 1,
26140 (tokuhirom 2008-08-24): );
26140 (tokuhirom 2008-08-24): $builder_meta->make_immutable;
26140 (tokuhirom 2008-08-24): $builder_meta->name->new(
26140 (tokuhirom 2008-08-24): chunk_size => 1,
26140 (tokuhirom 2008-08-24): );
26140 (tokuhirom 2008-08-24): };
26140 (tokuhirom 2008-08-24):
25730 (tokuhirom 2008-08-17): sub req {
25730 (tokuhirom 2008-08-17): my %args = @_;
26140 (tokuhirom 2008-08-24):
25730 (tokuhirom 2008-08-17): HTTP::Engine::Request->new(
26140 (tokuhirom 2008-08-24): request_builder => $BUILDER,
25730 (tokuhirom 2008-08-17): _connection => {
25730 (tokuhirom 2008-08-17): env => \%ENV,
25730 (tokuhirom 2008-08-17): input_handle => \*STDIN,
25730 (tokuhirom 2008-08-17): output_handle => \*STDOUT,
25730 (tokuhirom 2008-08-17): },
25730 (tokuhirom 2008-08-17): %args
25730 (tokuhirom 2008-08-17): );
25263 ( yappo 2008-08-09): }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment