The stupid question is the question not asked | |
PerlMonks |
Segfault with MooseX::Declare and Regexp::Grammarsby betterworld (Curate) |
on Feb 27, 2011 at 12:42 UTC ( [id://890409]=perlquestion: print w/replies, xml ) | Need Help?? |
betterworld has asked for the wisdom of the Perl Monks concerning the following question: I tried using Regexp::Grammars together with MooseX::Declare, and the result was… a segfault. My code is:
The output of this program is:
These strange hash keys ("@" and "!") seem to be some internal values of Regexp::Grammars. I see nothing about them in the documentation, so I'd say their exposure is a bug. However this does not seem to have anything to do with the segfault: The grammar calls the Foo constructor like in the following, but it won't segfault if I do so manually:
Also, the segmentation fault disappears if I do either of:
I should probably report a bug somewhere. However I am unsure where it should be reported. Regexp::Grammar itself does not seem to use any XS or lowlevel stuff, so it is probably not the problem. However, it uses many funny features of the new regexp engine. MooseX::Declare on the other hand uses a whole bunch of modules with a lot of magic in them. Maybe you can help me pinpoint the origin of this bug. I use perl v5.10.1, MooseX::Declare 0.34, Regexp::Grammars 1.012, all current Debian wheezy versions.
Back to
Seekers of Perl Wisdom
|
|