Nick, > It is how the parsing of the class declaration works. We use a mixture > of the facilities provided by Devel::Declare and also PPI (for > signatures) to make the magic happen. Could it be fixed? Probably. This > has to do with the class keyword and option parsing (with, extends, > etc). > > You are welcome to come join the #devel-declare channel on irc.perl.org > and we can guide you in fixing this problem, if you so desire. We love > volunteers :)
I hear ya! :) Well, perhaps I will try to tackle this at some point, but it seems to me that really the proper fix is to add something to Devel::Declare (sort of a strip_comment or somesuch), and then utilize that inside MooseX::Declare. It isn't even the code that daunts me so much (although I do find the inner workings of things that intercept the Perl parser somewhat mysterious)--it's how to design such a solution. Because, to be thorough about it, you'd have to be skipping comments constantly ... they could be anywhere! Maybe something that gives Devel::Declare permission to skip comments automatically, as it does (or at least I think it does) for whitespace ... ? Just riffing off the top of my head here. (Upon reflection: this would mean that the comments would disappear from the source before the parser actually hits them. But is that bad? Maybe something like Smart::Comments might be impacted? I really have no idea about all this stuff. <g>) -- Buddy