Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

small fixes

  • Loading branch information...
commit a62617f1430640498eb2976acf4d3201de21e870 1 parent b793f6e
Sawyer X authored June 10, 2010

Showing 1 changed file with 4 additions and 5 deletions. Show diff stats Hide diff stats

  1. 9  lib/Net/IPAddress/Minimal.pm
9  lib/Net/IPAddress/Minimal.pm
@@ -6,14 +6,13 @@ use warnings;
6 6
 use base 'Exporter';
7 7
 
8 8
 our @EXPORT_OK = qw( ip_to_num num_to_ip invert_ip );
9  
-
10  
-our $VERSION = '0.02';
  9
+our $VERSION   = '0.02';
11 10
 
12 11
 sub test_string_structure {
13 12
     my $string = shift || q{};
14 13
 
15  
-    if ( $string =~ /(\d+\.\d+\.\d+\.\d+)/ ) {
16  
-        # If this is an IP, return the ip flag and seperated IP classes
  14
+    if ( $string =~ /^(\d+\.\d+\.\d+\.\d+)$/ ) {
  15
+        # If this is an IP, return the ip flag and IP address
17 16
         return 'ip', $1;
18 17
     } elsif ( $string =~ /^(\d+)$/ ) {
19 18
         return 'num';
@@ -166,7 +165,7 @@ it's an IPv4 string, and IP number or something else (which is an error).
166 165
 
167 166
 Tamir Lousky, C<< <tlousky at cpan.org>  >>
168 167
 
169  
-XSawyerX,     C<< <xsawyerx at cpan.org> >>
  168
+SawyerX, C<< <xsawyerx at cpan.org> >>
170 169
 
171 170
 =head1 BUGS
172 171
 

0 notes on commit a62617f

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