Skip Menu |

This queue is for tickets about the PIX-Walker CPAN distribution.

Report information
The Basics
Id: 25399
Status: resolved
Priority: 0/
Queue: PIX-Walker

People
Owner: Nobody in particular
Requestors: ryan [...] muppethouse.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Patch for PIX::Object::network
Date: Mon, 12 Mar 2007 22:20:22 -0400
To: bug-PIX-Walker [...] rt.cpan.org
From: "Ryan Shea" <ryan [...] muppethouse.com>
I use rancid to pull configs. For some reason sometimes it fails to grab a leading space. This is not a bug with your module - but I think \s* would be reasonable in the regular expression instead of requiring at least one space and it would fix this problem for me. Besides, it looks like you do not require a space for the group-object case. --- network.pm 2006-06-07 13:10:02.000000000 -0400 +++ network.pm.new 2007-03-12 22:12:27.000000000 -0400 @@ -29,7 +29,7 @@ $self->add($ip, $mask); } elsif ($line =~ /^\s*group-object (\S+)/) { push(@{$self->{groups}}, $1); - } elsif ($line =~ /^\s+description (.+)/) { + } elsif ($line =~ /^\s*description (.+)/) { $self->{desc} = $1; } else { warn "$self->{name}: Unknown network object line: $line\n";
Thanks, I'll make the change to the regex. On Mon Mar 12 22:20:39 2007, ryan@muppethouse.com wrote: Show quoted text
> I use rancid to pull configs. For some reason sometimes it fails to > grab a leading space. This is not a bug with your module - but I > think \s* would be reasonable in the regular expression instead of > requiring at least one space and it would fix this problem for me. > Besides, it looks like you do not require a space for the group-object > case. > > --- network.pm 2006-06-07 13:10:02.000000000 -0400 > +++ network.pm.new 2007-03-12 22:12:27.000000000 -0400 > @@ -29,7 +29,7 @@ > $self->add($ip, $mask); > } elsif ($line =~ /^\s*group-object (\S+)/) { > push(@{$self->{groups}}, $1); > - } elsif ($line =~ /^\s+description (.+)/) { > + } elsif ($line =~ /^\s*description (.+)/) { > $self->{desc} = $1; > } else { > warn "$self->{name}: Unknown network object > line: $line\n";