Skip Menu |

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

Report information
The Basics
Id: 30555
Status: resolved
Priority: 0/
Queue: Net-DHCP-Info

People
Owner: Nobody in particular
Requestors: spacey-rt.cpan.org [...] ssr.com
Cc:
AdminCc:

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



Subject: Bugs/fetaure requests for Net::DHCP::Info
Date: Wed, 7 Nov 2007 09:54:12 -0800
To: bug-Net-DHCP-Info [...] rt.cpan.org
From: "Peter C. Norton" <spacey-rt.cpan.org [...] ssr.com>
I've just started using Net::DHCP::Info to save time in writing a parser for the file format of my own, and have needed to extend it a bit. In my organization, we use dhcpd.conf files that include global options and group options. I've hacked together some changes that allow for a couple of changes to accomodate this: 1) Reads the entire dhcpd.conf to find any options defined at the top level, and assign those options to all subnets (to be overridden by each subnet when/if those options are present as subnets are parsed). Then rewind the file object. 2) When encountering a group statement, read all options defined in the group and assign those to subnets that are defined within the group scope, overriding any globally-scoped options, but which can be overridden if defined by the subnet. I don't believe that dhcpd will honor nested group scopes, so I don't allow that either. This should allow for option spaces to be accommodated as well. However it doesn't cover the complete list of declarations possible in the dhcpd.conf file. It could be added, but I've done this under a tight deadline, so I don't want to add to the testing I need to do :( I'm not sure my approach is the best, but if these improvements are useful please let me know and I'll send the patches to you for approval. Thanks, -Peter -- The 5 year plan: In five years we'll make up another plan. Or just re-use this one.
From: pause [...] flodhest.net
Yes, I am very much interested in _any_ improvement. I'm also happy to see that my work is useful for other than myself :) Thanks in advance.
Subject: Re: [rt.cpan.org #30555] Bugs/fetaure requests for Net::DHCP::Info
Date: Fri, 9 Nov 2007 08:54:55 -0800
To: Jan Henning Thorsen via RT <bug-Net-DHCP-Info [...] rt.cpan.org>
From: "Peter C. Norton" <spacey-rt.cpan.org [...] ssr.com>
On Wed, Nov 07, 2007 at 06:18:22PM -0500, Jan Henning Thorsen via RT wrote: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=30555 > > > Yes, I am very much interested in _any_ improvement. I'm also happy to > see that my work is useful for other than myself :) > > Thanks in advance.
I've looked at this a bit more, and the dhcpd configuration I'm parsing has a lot of nesting (eg of groups within pools and subnets and individual hosts inside of that) . I'm considering using Config::Scoped as the better way to do this for my application. I think would work better as a separate subcless of Net::DHCP::Info. This would be an object with more state pertaining to the whole configuration, so multiple queries could be run without re-reading the file. Thanks, -Peter -- The 5 year plan: In five years we'll make up another plan. Or just re-use this one.
Resolved for now, might be re-opened if patch is commited...