Skip Menu |

This queue is for tickets about the Parse-RecDescent CPAN distribution.

Report information
The Basics
Id: 19914
Status: resolved
Priority: 0/
Queue: Parse-RecDescent

People
Owner: Nobody in particular
Requestors: ivorw-cpan [...] xemaps.com
Cc:
AdminCc:

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



Subject: Namespace for autotree objects
I like the <autotree> directive, and the parse trees generated nearly always meet my needs, without resorting to writing my own actions. However, this blesses the objects into a top level package namespace. I use this in scripts quite a lot. However, I am reluctant to release any CPAN modules that use this technique as they will be polluting the module users' package namespace, and could collide. What would resolve this issue is a namespace prefix. Something like: <autotree My::Module> or <autotree namespace="My::Module"> and all autotree nodes will be blessed into My::Module::nodename instead of nodename.
New subsidiary code uploaded to CPAN as Parse::RecDescent::Topiary. At some future date, you could incorporate this functionality into Parse::RecDescent, andif this happens I will look to obsoleting my distribution. This ticket can be closed, but you might like to keep it open as a placeholder.
This functionality appears to have been a part of Parse::RecDescent since version 1.95.1 according to the changes file. I've added POD for this syntax, as well as a simple test case. You can find the commit link below. It will be a part of the next release. Thank you! https://github.com/jtbraun/Parse-RecDescent/commit/b5a46754573b0f88f44c1ffb3deb190925b288b1