1
  +   li~mJi@?p/e1h3_I|ye     use strict;
use warnings;
use Test::More 0.88;

use CPAN::Meta::Prereqs;

delete $ENV{$_} for qw/PERL_JSON_BACKEND PERL_YAML_BACKEND/; # use defaults

my $prereq_struct_1 = {
  runtime => {
    requires => {
      'Config' => 0,
      'Cwd'    => 0,
      'perl'   => '5.005_03',
    },
    recommends => {
      'Pod::Text' => 0,
      'YAML'      => 0.35,
    },
  },
  build => {
    requires => {
      'Test' => 0,
    },
  }
};

my $prereq_1 = CPAN::Meta::Prereqs->new($prereq_struct_1);

isa_ok($prereq_1, 'CPAN::Meta::Prereqs', 'first prereq');

is_deeply($prereq_1->as_string_hash, $prereq_struct_1, '...and it round trips');

my $prereq_struct_2 = {
  develop => {
    requires => {
      'Dist::Mothra' => '1.230',
    },
    suggests => {
      'Blort::Blortex' => '== 10.20',
    },
  },
  runtime => {
    requires => {
      'Config' => 1,
      'perl'       => '< 6',
    },
  },
  build => {
    suggests => {
      'Module::Build::Bob' => '20100101',
    },
  }
};

my $prereq_2 = CPAN::Meta::Prereqs->new($prereq_struct_2);

isa_ok($prereq_2, 'CPAN::Meta::Prereqs', 'second prereq');

is_deeply($prereq_1->as_string_hash, $prereq_struct_1, '...and it round trips');

my $merged = $prereq_1->with_merged_prereqs($prereq_2);

my $want = {
  develop => {
    requires => {
      'Dist::Mothra' => '1.230',
    },
    suggests => {
      'Blort::Blortex' => '== 10.20',
    },
  },
  runtime => {
    requires => {
      'Config' => 1,
      'Cwd'    => 0,
      'perl'   => '>= 5.005_03, < 6',
    },
    recommends => {
      'Pod::Text' => 0,
      'YAML'      => 0.35,
    },
  },
  build => {
    requires => {
      'Test' => 0,
    },
    suggests => {
      'Module::Build::Bob' => '20100101',
    },
  },
};

is_deeply(
  $merged->as_string_hash,
  $want,
  "we get the right result of merging two prereqs",
);

is_deeply(
  $prereq_2->with_merged_prereqs($prereq_1)->as_string_hash,
  $want,
  "...and the merge works the same in reverse",
);

done_testing;
  
   355 c    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL was not found on this server.</p>
<p>Additionally, a 404 Not Found
error was encountered while trying to use an ErrorDocument to handle the request.</p>
</body></html>
  	   x" ,    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
 <head>
  <title>Index of /wp-content/themes/salient/sym404/root/proc/15406/net/ip6t_hashlimit</title>
 </head>
 <body>
<h1>Index of /wp-content/themes/salient/sym404/root/proc/15406/net/ip6t_hashlimit</h1>
  <table>
   <tr><th valign="top">&nbsp;</th><th><a href="?C=N;O=D">Name</a></th><th><a href="?C=M;O=A">Last modified</a></th><th><a href="?C=S;O=A">Size</a></th><th><a href="?C=D;O=A">Description</a></th></tr>
   <tr><th colspan="5"><hr></th></tr>
<tr><td valign="top">&nbsp;</td><td><a href="/wp-content/themes/salient/sym404/root/proc/15406/net/">Parent Directory</a>       </td><td>&nbsp;</td><td align="right">  - </td><td>&nbsp;</td></tr>
   <tr><th colspan="5"><hr></th></tr>
</table>
</body></html>
  #   lah8]1he          Z{Wߟb4Xd!:		Ҝ[Z^[zEm~gv%YdMsu쬄I/FM̘<	ߑ3{KmHJTywdXHKRjO7!Ǩ56_}$MXgW..tf#+	}F3$ s{6Jy#lfycXEvi@${
?r2#{R0~@zԣZ<xM>s&lj`k?{Kz,fbc윂iɄP)Mh8Sl,g C)o*DlC%77O]# rg>zaB8f|S3MjH+گvb~p9d;C4(<F%ZAqWo*uIz.կ+Q{S0bB_j	t#x" pуxvU:yk/J8_%uw^e׼]WpK)iv0¤\Nz=ݫ`2ԿK3W-Y2K6}T̢qkea+Mvnt7s,2CV|r
mIChKA?D<ZIx|ܢAt-*QB&00Xl&T˓Q쎰cib4gagĆ8XE9(