Skip to content

Instantly share code, notes, and snippets.

@tokuhirom
Created August 28, 2008 12:14
Show Gist options
  • Save tokuhirom/7713 to your computer and use it in GitHub Desktop.
Save tokuhirom/7713 to your computer and use it in GitHub Desktop.
==> foo.pl <==
use strict;
use warnings;
use Moose::Meta::Class;
use Moose::Util;
my $builder_meta = Moose::Meta::Class->create(
't::Utils::HTTPRequestBuilder' => (
superclass => 'Moose::Meta::Class',
roles => [qw(
HTTP::Engine::Role::RequestBuilder
HTTP::Engine::Role::RequestBuilder::ParseEnv
)],
)
);
warn "OK";
==> lib/HTTP/Engine/Role/RequestBuilder.pm <==
package HTTP::Engine::Role::RequestBuilder;
use Moose::Role;
requires "_build_cookies";
1;
==> lib/HTTP/Engine/Role/RequestBuilder/ParseEnv.pm <==
package HTTP::Engine::Role::RequestBuilder::ParseEnv;
use Moose::Role;
with 'HTTP::Engine::Role::RequestBuilder::Standard' => {
alias => {
_build_hostname => '_aliased',
}
};
sub _build_hostname { }
1;
==> lib/HTTP/Engine/Role/RequestBuilder/Standard.pm <==
package HTTP::Engine::Role::RequestBuilder::Standard;
use Moose::Role;
sub _build_cookies { }
sub _build_hostname { }
1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment