Skip Menu |

This queue is for tickets about the Org-Parser CPAN distribution.

Report information
The Basics
Id: 68445
Status: resolved
Worked: 5 min
Priority: 0/
Queue: Org-Parser

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc: srezic [...] iconmobile.com
AdminCc:

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



Subject: File line number in errors
For any error of the form Invalid line in table: *** DONE something at /usr/perl5.12.0/lib/site_perl/5.12.0/Org/Element/Table.pm line 52, <> line 24166. the org parser reports the last line of the org file (in this example the org file had 24166 lines). Maybe this happens because File::Slurp::read_file is still active while calling the parse method in Org::Parser::parse_file, and could be solved easily by creating a temporary scalar with the read_file result and feed it to the parse method. Regards, Slaven
On Tue May 24 12:22:20 2011, SREZIC wrote: Show quoted text
> For any error of the form > > Invalid line in table: *** DONE something at > /usr/perl5.12.0/lib/site_perl/5.12.0/Org/Element/Table.pm line 52, <> > line 24166. > > the org parser reports the last line of the org file (in this example > the org file had 24166 lines). Maybe this happens because > File::Slurp::read_file is still active while calling the parse method
in Show quoted text
> Org::Parser::parse_file, and could be solved easily by creating a > temporary scalar with the read_file result and feed it to the parse
method. Show quoted text
> > Regards, > Slaven
Hi Slaven, This happens because the dump-org-structure script feeds the parser with [<>], and ARGV has not been closed. I have closed it to avoid Perl reporting ", <> line XX" in error messages. https://github.com/sharyanto/perl-Org-Parser/ commit/5a165d4b876a1dc8923cfd0680541074dbc483ba -- sh