Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Releasing version 0.02 with bug fixes, tests and better pod

  • Loading branch information...
commit da2c92a4604e3953731c5e5ce2ca440c4619a31d 1 parent ebcd973
@Tlousky authored
View
5 Changes
@@ -1,5 +1,10 @@
Revision history for Net-IPAddress-Minimal
+0.02 10.6.2010
+ * 100% test coverage
+ * Bug fixes for uninitialized values
+ * POD fixes and cleanups
+
0.01 10.6.2010
First version, Weehooo.
View
28 META.yml
@@ -1,24 +1,24 @@
---
-abstract: 'IP string to number and back'
+name: Net-IPAddress-Minimal
+version: 0.02
author:
- 'Tamir Lousky <tlousky@cpan.org>'
+abstract: IP string to number and back
+license: perl
+resources:
+ license: http://dev.perl.org/licenses/
build_requires:
Test::Exception: 0
Test::More: 0
+requires:
+ Exporter: 0
configure_requires:
- Module::Build: 0.36
-generated_by: 'Module::Build version 0.3607'
-license: perl
-meta-spec:
- url: http://module-build.sourceforge.net/META-spec-v1.4.html
- version: 1.4
-name: Net-IPAddress-Minimal
+ Module::Build: 0.340201
provides:
Net::IPAddress::Minimal:
file: lib/Net/IPAddress/Minimal.pm
- version: 0.01
-requires:
- Exporter: 0
-resources:
- license: http://dev.perl.org/licenses/
-version: 0.01
+ version: 0.02
+generated_by: Module::Build version 0.340201
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: 1.4
View
2  Makefile.PL
@@ -1,4 +1,4 @@
-# Note: this file was auto-generated by Module::Build::Compat version 0.3607
+# Note: this file was auto-generated by Module::Build::Compat version 0.340201
use ExtUtils::MakeMaker;
WriteMakefile
(
View
42 README
@@ -2,60 +2,60 @@ NAME
Net::IPAddress::Minimal - IP string to number and back
VERSION
- Version 0.01
+ Version 0.02
SYNOPSIS
This module converts IPv4 strings to integer IP numbers and vice versa.
It's built to be used as quickly and easily as possible, which is why
- you can just simply use the invert_ip function.
+ you can just simply use the "invert_ip" function.
It recognizes whether you have an IPv4 string or a number and converts
it to the other form.
Here's a sample script:
- ` use strict; use warnings;
-
use Net::IPAddress::Minimal ('invert_ip');
my $input_string = shift @ARGV;
-
- my $output = invert_ip( $input_string );
+ my $output = invert_ip( $input_string );
print "$output\n";
- `
EXPORT
Three functions can be exported:
- invert_ip num_to_ip ip_to_num
+ * invert_ip
+
+ * num_to_ip
+
+ * ip_to_num
SUBROUTINES/METHODS
invert_ip
-gets an IPv4 string or an IP number and converts it to the other form.
- ` my $ip_num = invert_ip( '10.200.10.130' ); # $ip_str = 180882050
+ Gets an IPv4 string or an IP number and converts it to the other form.
+ my $ip_num = invert_ip( '10.200.10.130' );
+ # $ip_str = 180882050
+
my $ip_num = invert_ip( 180882050 );
- # $ip_str = '10.200.10.130';
- `
+ # $ip_str = '10.200.10.130';
num_to_ip
Gets an IP number and returns an IPv4 string.
my $ip_num = num_to_ip( 3232235778 );
- # $ip_str = '192.168.1.2';
+ # $ip_str = '192.168.1.2';
ip_to_num
Gets a IPv4 string and returns the matching IP number.
- ** Note that at the moment this function does not ensure that each of
- the class numbers are between 0-255, and it can return unexpected
- results when misused **
+ Note that at the moment this function does not ensure that each of the
+ class numbers are between 0-255, and it can return unexpected results
+ when misused
- my $ip_arrayref = '212.212.212.212';
- my $ip_num = ip_to_num( $ip_arrayref );
- # $ip_num = 3570717908
+ my $ip_num = ip_to_num( '212.212.212.212' );
+ # $ip_num = 3570717908
test_string_structure
Checks the structure of the input string and returns flags indicating
@@ -63,7 +63,9 @@ gets an IPv4 string or an IP number and converts it to the other form.
an error).
AUTHORS
- Tamir Lousky, "<tlousky at cpan.org>" XSawyerX, "<xsawyerx at cpan.org>"
+ Tamir Lousky, "<tlousky at cpan.org>"
+
+ XSawyerX, "<xsawyerx at cpan.org>"
BUGS
Please report any bugs or feature requests to "bug-net-ipaddress-minimal
View
4 lib/Net/IPAddress/Minimal.pm
@@ -7,7 +7,7 @@ use base 'Exporter';
our @EXPORT_OK = qw( ip_to_num num_to_ip invert_ip );
-our $VERSION = '0.01';
+our $VERSION = '0.02';
sub test_string_structure {
my $string = shift || q{};
@@ -92,7 +92,7 @@ Net::IPAddress::Minimal - IP string to number and back
=head1 VERSION
-Version 0.01
+Version 0.02
=head1 SYNOPSIS
Please sign in to comment.
Something went wrong with that request. Please try again.