Skip Menu |
 

This queue is for tickets about the Net-IP CPAN distribution.

Report information
The Basics
Id: 45165
Status: resolved
Priority: 0/
Queue: Net-IP

People
Owner: Nobody in particular
Requestors: mmusgrove [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in:
  • 1.23
  • 1.24
  • 1.25
Fixed in: 1.26



Subject: Code or Documenation Bug For ip_range_to_prefix
The documentation for ip_range_to_prefix shows that you pass it the first and last IP along with a version. ip_range_to_prefix Return all prefixes between two IPs. Params : First IP, Last IP, IP version Returns : List of Prefixes or undef (problem) The prefixes returned have the form q.q.q.q/nn. @prefix = ip_range_to_prefix ($ip1,$ip2,6); Passing it strings (like you do with ip_is_ipv4) returns an empty list. Passing it Net::IP objects results in a fatal error: Operation "eq": no method found, left argument in overloaded package Net::IP, right argument in overloaded package Net::IP at /usr/lib/perl5/vendor_perl/5.8.8/Net/IP.pm line 1306. I looked at the code and it is expecting you to pass it a binary IP. # Subroutine ip_range_to_prefix # Purpose : Return all prefixes between two IPs # Params : First IP, Last IP, IP version # Returns : List of Prefixes or undef (problem) sub ip_range_to_prefix { my ($binip, $endbinip, $ip_version) = @_;


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.