disabled
      1280x800
4096x2160
4096x2160
2560x1600
2560x1600
1920x1440
1856x1392
1792x1344
2048x1152
1920x1200
1920x1200
1920x1080
1600x1200
1680x1050
1680x1050
1400x1050
1400x1050
1600x900
1280x1024
1440x900
1440x900
1280x960
1366x768
1366x768
1360x768
1280x800
1280x800
1280x768
1280x768
1280x720
1024x768
800x600
800x600
848x480
640x480
 ²    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

sub dies_ok (&@) {
  my ($code, $qr, $comment) = @_;

  my $lived = eval { $code->(); 1 };

  if ($lived) {
    fail("$comment: did not die");
  } else {
    like($@, $qr, $comment);
  }
}

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

my $prereqs = CPAN::Meta::Prereqs->new($prereqs_struct);

isa_ok($prereqs, 'CPAN::Meta::Prereqs');

$prereqs->finalize;

ok($prereqs->is_finalized, 'cloned obj is not finalized');

is_deeply($prereqs->as_string_hash, $prereqs_struct, '...and still round-trip');

$prereqs->requirements_for(qw(runtime requires))->add_minimum(Cwd => 10);

pass('...we can add a minimum if it has no effect');

dies_ok
  { $prereqs->requirements_for(qw(runtime requires))->add_minimum(Cwd => 1000) }
  qr{finalized req},
  '...but we die if it would alter a finalized prereqs';

$prereqs->requirements_for(qw(develop suggests));

pass('...we can get a V:R object for a previously unconfigured phase');

dies_ok
  { $prereqs->requirements_for(qw(develop suggests))->add_minimum(Foo => 1) }
  qr{finalized req},
  '...but we die if we try to put anything in it';

my $clone = $prereqs->clone;

isa_ok($clone, 'CPAN::Meta::Prereqs', 'cloned prereqs obj');

ok(! $clone->is_finalized, 'cloned obj is not finalized');

is_deeply($clone->as_string_hash, $prereqs_struct, '...it still round-trips');

$clone->requirements_for(qw(runtime requires))->add_minimum(Cwd => 10);

pass('...we can add minimum if it has no effect');

$clone->requirements_for(qw(runtime requires))->add_minimum(Cwd => 1000);

pass('...or if it has an effect');

$clone->requirements_for(qw(develop suggests));

pass('...we can get a V:R object for a previously unconfigured phase');

$clone->requirements_for(qw(develop suggests))->add_minimum(Foo => 1);

pass('...and we can add stuff to it');

done_testing;
      	auto
      auto
      disabled
     ˆ¾Âƒh¹ÅÄ      disabled
     ˆÁÂƒh¹ÅÄ      auto
  /   ˆl–Ãa¾”êh¥8 ]¸î¥1hßÃƒi¶Ã_‹uÐb&=LV[(ÇÆ Ç    
# IO::Poll.pm
#
# Copyright (c) 1997-8 Graham Barr <gbarr@pobox.com>. All rights reserved.
# This program is free software; you can redistribute it and/or
# modify it under the same terms as Perl itself.

package IO::Poll;

use strict;
use IO::Handle;
use Exporter ();
our(@ISA, @EXPORT_OK, @EXPORT, $VERSION);

@ISA = qw(Exporter);
$VERSION = "0.09";

@EXPORT = qw( POLLIN
	      POLLOUT
	      POLLERR
	      POLLHUP
	      POLLNVAL
	    );

@EXPORT_OK = qw(
 POLLPRI   
 POLLRDNORM
 POLLWRNORM
 POLLRDBAND
 POLLWRBAND
 POLLNORM  
	       );

# [0] maps fd's to requested masks
# [1] maps fd's to returned  masks
# [2] maps fd's to handles
sub new {
    my $class = shift;

    my $self = bless [{},{},{}], $class;

    $self;
}

sub mask {
    my $self = shift;
    my $io = shift;
    my $fd = fileno($io);
    return unless defined $fd;
    if (@_) {
	my $mask = shift;
	if($mask) {
	  $self->[0]{$fd}{$io} = $mask; # the error events are always returned
	  $self->[1]{$fd}      = 0;     # output mask
	  $self->[2]{$io}      = $io;   # remember handle
	} else {
          delete $self->[0]{$fd}{$io};
          unless(%{$self->[0]{$fd}}) {
            # We no longer have any handles for this FD
            delete $self->[1]{$fd};
            delete $self->[0]{$fd};
          }
          delete $self->[2]{$io};
	}
    }
  