Subject: | DEBUGGING + split $sep = KABLAM |
This is one of the weirdest bugs I've seen. Consider:
package T;
use Method::Signatures;
method foo {
my @a = split $;, 'hi';
}
1
If Perl 5.12 (at least .1 and .4) is compiled with -DDEBUGGING, the
above code triggers an
assert() that's related to format processing:
$ perl -Ilib -MT -e0
$ debugperl -Ilib -MT -e0
debugperl: pad.c:1525: Perl_cv_clone: Assertion `depth || ((svtype)
((proto)->sv_flags &
0xff)) == SVt_PVFM' failed.
Without -DDEBUGGING everything seems fine. Perhaps it's a bad assert.
I'm also reporting
this to p5p, but in case anyone else is getting this assert, doing the
split some other way
can avoid the assert; for example, split '~',$var is fine. No idea why.