Skip Menu |

This queue is for tickets about the Text-DHCPLeases CPAN distribution.

Report information
The Basics
Id: 40699
Status: resolved
Priority: 0/
Queue: Text-DHCPLeases

People
Owner: Nobody in particular
Requestors: mecca [...] nullresult.com
Cc:
AdminCc:

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



Subject: Error: Statement not recognized: ends never
Date: Wed, 5 Nov 2008 17:15:17 -0800
To: bug-Text-DHCPleases [...] rt.cpan.org
From: mecca <mecca [...] nullresult.com>
Hello, First off, please forgive me if this is something stupid on my part. I believe this code was working before updating to perl 5.10 from 5.8, but I unfortunately can't be 100% certain. I've verified that the dhcpd.leases file has correct permissions and the data doesn't seem to be corrupt. The lease file is actively being updated by dhcpd. Environment: ----------- Debian Linux(sid) Text-DHCPLeases-v0.6 perl 5.10.0 ISC DHCP 3.1.1. My failing code: ---------------- #!/usr/bin/perl -w use Text::DHCPLeases; use strict; my $leases = Text::DHCPLeases->new(file=>"/var/lib/dhcp3/dhcpd.leases"); Error: ------ Text::DHCPLeases::Object::parse Error: Statement not recognized: ends never; at /usr/local/share/perl/5.10.0/Text/DHCPLeases.pm line 148 Running perl debugger: ---------------------- $ perl -d dhcp_leases.pl Loading DB routines from perl5db.pl version 1.3 Editor support available. Enter h or `h h' for help, or `man perldebug' for more help. main::(dhcp_leases.pl:5): my $leases = Text::DHCPLeases->new(file=>"/var/lib/dhcp3/dhcpd.leases"); DB<1> n Text::DHCPLeases::Object::parse Error: Statement not recognized: ends never; at /usr/local/share/perl/5.10.0/Text/DHCPLeases.pm line 148 at /usr/local/share/perl/5.10.0/Text/DHCPLeases/Object.pm line 226 Text::DHCPLeases::Object::parse('Text::DHCPLeases::Object', 'ARRAY(0xb06c38)') called at /usr/local/share/perl/5.10.0/Text/DHCPLeases.pm line 148 Text::DHCPLeases::_parse('Text::DHCPLeases=HASH(0xad5050)', '/var/lib/dhcp3/dhcpd.leases') called at /usr/local/share/perl/5.10.0/Text/DHCPLeases.pm line 61 Text::DHCPLeases::new('Text::DHCPLeases', 'file', '/var/lib/dhcp3/dhcpd.leases') called at dhcp_leases.pl line 5 Debugged program terminated. Use q to quit or R to restart, use o inhibit_exit to avoid stopping after program termination, h q, h R or h o to get additional info. Example lease statement from my dhcpd.leases: --------------------------------------------- lease 10.10.20.117 { starts 3 2008/11/05 23:54:39; ends 4 2008/11/06 00:54:39; tstp 4 2008/11/06 00:54:39; tsfp 4 2008/11/06 01:24:39; atsfp 4 2008/11/06 01:24:39; cltt 3 2008/11/05 23:54:39; binding state free; hardware ethernet 00:15:58:29:11:05; uid "\001\000\025X)\021\005"; }
Fixed in 0.7, which I just uploaded to CPAN. Thanks for reporting this. cv On Wed Nov 05 20:15:40 2008, mecca@nullresult.com wrote: Show quoted text
> Hello, > > First off, please forgive me if this is something stupid on my part. I > believe this code was working before updating to perl 5.10 from > 5.8, but I unfortunately can't be 100% certain. I've verified that > the dhcpd.leases file has correct permissions and the data doesn't > seem to be corrupt. The lease file is actively being updated by > dhcpd. > > Environment: > ----------- > Debian Linux(sid) > Text-DHCPLeases-v0.6 > perl 5.10.0 > ISC DHCP 3.1.1. > > > My failing code: > ---------------- > #!/usr/bin/perl -w > use Text::DHCPLeases; > use strict; > my $leases = Text::DHCPLeases-
> >new(file=>"/var/lib/dhcp3/dhcpd.leases");
> > > Error: > ------ > Text::DHCPLeases::Object::parse Error: Statement not recognized: ends > never; > at /usr/local/share/perl/5.10.0/Text/DHCPLeases.pm line 148 > > > Running perl debugger: > ---------------------- > $ perl -d dhcp_leases.pl > > Loading DB routines from perl5db.pl version 1.3 > Editor support available. > > Enter h or `h h' for help, or `man perldebug' for more help. > > main::(dhcp_leases.pl:5): my $leases = Text::DHCPLeases-
> >new(file=>"/var/lib/dhcp3/dhcpd.leases");
> DB<1> n > Text::DHCPLeases::Object::parse Error: Statement not recognized: ends > never; > at /usr/local/share/perl/5.10.0/Text/DHCPLeases.pm line 148 > at /usr/local/share/perl/5.10.0/Text/DHCPLeases/Object.pm line 226 > Text::DHCPLeases::Object::parse('Text::DHCPLeases::Object', > 'ARRAY(0xb06c38)') called at > /usr/local/share/perl/5.10.0/Text/DHCPLeases.pm line 148 > Text::DHCPLeases::_parse('Text::DHCPLeases=HASH(0xad5050)', > '/var/lib/dhcp3/dhcpd.leases') called at > /usr/local/share/perl/5.10.0/Text/DHCPLeases.pm line 61 > Text::DHCPLeases::new('Text::DHCPLeases', 'file', > '/var/lib/dhcp3/dhcpd.leases') called at dhcp_leases.pl line 5 > Debugged program terminated. Use q to quit or R to restart, > use o inhibit_exit to avoid stopping after program termination, > h q, h R or h o to get additional info. > > > Example lease statement from my dhcpd.leases: > --------------------------------------------- > lease 10.10.20.117 { > starts 3 2008/11/05 23:54:39; > ends 4 2008/11/06 00:54:39; > tstp 4 2008/11/06 00:54:39; > tsfp 4 2008/11/06 01:24:39; > atsfp 4 2008/11/06 01:24:39; > cltt 3 2008/11/05 23:54:39; > binding state free; > hardware ethernet 00:15:58:29:11:05; > uid "\001\000\025X)\021\005"; > } >