Skip to content

Commit

Permalink
fix RIPE->new
Browse files Browse the repository at this point in the history
it ignored the "unfiltered" option
Also adds a test.
  • Loading branch information
moritz committed Sep 17, 2012
1 parent 200ad64 commit 56e06bf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 1 addition & 3 deletions lib/Net/Whois/RIPE.pm
Expand Up @@ -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',
Expand All @@ -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;

Expand Down
4 changes: 3 additions & 1 deletion t/02-methods.t
Expand Up @@ -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()
Expand Down Expand Up @@ -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';
}

{
Expand Down

0 comments on commit 56e06bf

Please sign in to comment.