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 e90a6ca8250b4d5a1de61f9e636a297c9c785003 1 parent d331fc2
Moritz Lenz authored
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

1 comment on commit e90a6ca

@arhuman

Seems fine to me.

But as this patch impacts Luis' code/choice, I prefer to wait for his validation.

Please sign in to comment.
Something went wrong with that request. Please try again.