Skip Menu |

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

Report information
The Basics
Id: 13041
Status: resolved
Priority: 0/
Queue: Tree-Parser

People
Owner: Nobody in particular
Requestors: fliedner [...] coli.uni-sb.de
Cc:
AdminCc:

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



Subject: Tree-Parser-0.10, unsetting deparse_filter_cleanup
Hello there, I just got Tree-Parser-0.10 from CPAN. Seems to be exactly what I needed (namely, parsing trees in bracket notation, outputting them as tabs). However, I think I stumbled upon a bug. (Possibly, I'm just trying to use the module in a wrong way.) The problem seems to be that, that most use...Filters do NOT reset the deparse_filter_cleanup. I use the nested parens filter for parsing and tried using the tabindented for deparsing, which gave me a) a less-than-perfect printout b) an error message. Here's a (very simple&silly) example: use Tree::Parser; my $TP = Tree::Parser->new("(1 2 3 4 (5) 6)"); $TP->useNestedParensFilters(); $TP->parse(); $TP->useTabIndentedFilters(); print $TP->deparse(); What I did then was adding an $self->{deparse_filter_cleanup} = undef; to all the use...Filters subs (especially useTabIndentedFilters) and - it seems to work now! I've attached my Parser.pm file. Hope this IS a bug and I just don't use the whole module in a wrong way. Cheers, Gerd

Message body is not shown because it is too large.

Gerd, Thanks for reporting this issue. I have applied your code changes, and have released it as version 0.11 which should be available on CPAN shortly. Thanks, Stevan