Permalink
Browse files

fix RIPE->new

it ignored the "unfiltered" option
Also adds a test.
  • Loading branch information...
moritz committed Sep 17, 2012
1 parent 200ad64 commit 56e06bf693e4f4c5bb39f3bf04befb70e0990616
Showing with 4 additions and 4 deletions.
  1. +1 −3 lib/Net/Whois/RIPE.pm
  2. +3 −1 t/02-methods.t
View
@@ -170,8 +170,6 @@ connection to the RIPE Database service desired.
=cut
{
- my @option_keys = qw{hostname port timeout keepalive referral
- recursive grouping types};
my %default_options = (
hostname => 'whois.ripe.net',
port => '43',
@@ -190,7 +188,7 @@ connection to the RIPE Database service desired.
my %known_options;
$known_options{$_}
= exists $options{$_} ? $options{$_} : $default_options{$_}
- foreach @option_keys;
+ foreach keys %default_options;
my $self = bless { __options => \%known_options }, $class;
View
@@ -29,7 +29,7 @@ can_ok $class,
qw( DESTROY );
{
- my $c = Net::Whois::RIPE->new( disconnected => 1 );
+ my $c = Net::Whois::RIPE->new( disconnected => 1, unfiltered => 1 );
isa_ok $c, $class;
# hostname()
@@ -78,6 +78,8 @@ can_ok $class,
ok !$c->grouping, q{and 0 is probably the only way to turn it off.};
$c->grouping('yes');
ok $c->grouping, q{true values are interpreted as true for grouping.};
+
+ ok $c->unfiltered, '->new can set the unfiltered flag';
}
{

0 comments on commit 56e06bf

Please sign in to comment.