use HTTP::Request ();
sub new_he{
- my($use_pp) = @_;
+ my($use_pp, $any_moose) = @_;
$ENV{MOUSE_PUREPERL} = $use_pp;
+ $ENV{ANY_MOOSE} = $any_moose if defined $any_moose;
require HTTP::Engine;
my $req = HTTP::Request->new(GET => 'http://localhost/');
print "load HTTP::Engine, new(), and run()\n";
-cmpthese -1 => {
+cmpthese -2 => {
'XS' => sub {
my $he = new_he(0);
$he->run($req, env => \%ENV);
my $he = new_he(1);
$he->run($req, env => \%ENV);
},
+ 'Moose' => sub {
+ my $he = new_he(0, 'Moose');
+ $he->run($req, env => \%ENV);
+ },
};
print "load HTTP::Engine, new(), and run() * 100\n";
-cmpthese -1 => {
+cmpthese -2 => {
'XS' => sub {
my $he = new_he(0);
$he->run($req, env => \%ENV) for 1 .. 100;
my $he = new_he(1);
$he->run($req, env => \%ENV) for 1 .. 100;
},
+ 'Moose' => sub {
+ my $he = new_he(0, 'Moose');
+ $he->run($req, env => \%ENV) for 1 .. 100;
+ },
};