Yeha ok im with you.
But the way Net::DHCP imports constants in to main:: name space is crappy.
Im thinking that where now you call
new (
CONSTANT() => 'value',
);
it would be better just to go
new(
'CONSTANT' => 'value'
);
Then Net::DHCP examines each key, converting them to numbers internally.
So with that in place, it would simply be a matter of overriding the sub
that resolves the names to numbers - falling back to the original if its
unable to find it.
That would allow you to also tie in custom value types in addition to
using 'int' etc
On 11/24/2010, "Philip Prindeville via RT" <bug-Net-DHCP@rt.cpan.org>
wrote:
Show quoted text> Queue: Net-DHCP
> Ticket <URL:
https://rt.cpan.org/Ticket/Display.html?id=54076 >
>
>On Wed Nov 24 05:26:02 2010, djzort wrote:
>> you know that you can just wack in any value you like right?
>>
>> see addOptionRaw()
>
>I was thinking of the case where you might be deriving another package
>from Net::Dhcp, but wanted to still allow for the handling of typed
>arguments... and where the added arguments might be experimental, or
>vendor-specific, etc.
>
>