Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

drop dependency on Iterator::Util

While usually I am all in favor of code reuse, I also have to package
dependencies for Debian Lenny (urgh), here it takes only three extra
extra lines of code to drop the dependency
  • Loading branch information...
commit d100fc9a1a4363e34babaa76646b97e057319938 1 parent a707a0c
Moritz Lenz authored committed
Showing with 6 additions and 5 deletions.
  1. +0 −1  Makefile.PL
  2. +6 −4 lib/Net/Whois/RIPE.pm
View
1  Makefile.PL
@@ -12,7 +12,6 @@ WriteMakefile(
PREREQ_PM => {
'Test::More' => 0,
'Iterator' => 0,
- 'Iterator::Util' => 0,
},
META_MERGE => {
recommends => {
View
10 lib/Net/Whois/RIPE.pm
@@ -6,7 +6,6 @@ use strict;
use IO::Socket::INET;
use IO::Select;
use Iterator;
-use Iterator::Util;
use constant {
SOON => 30,
@@ -515,9 +514,12 @@ connection will be terminated after this query.
sub object_types {
my $self = shift;
- my $iterator = igrep { !m{^%\s} } $self->__query(QUERY_LIST_OBJECTS);
- return if $iterator->is_exhausted;
- return split qr{\s+}, $iterator->value;
+ my $iterator = $self->__query(QUERY_LIST_OBJECTS);
+ while (!$iterator->is_exhausted) {
+ my $value = $iterator->value;
+ return split /\s+/, $value if $value !~ /^%\s/;
+ }
+ return;
}
=head1 AUTHOR
Please sign in to comment.
Something went wrong with that request. Please try again.