# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #109734] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=109734 >
<masak> how would you split a string into the first character and the rest of the string in Perl 6? <moritz> .split(/<at_pos(1)>/) <jnthn> ooh <moritz> nom: say 'foobar'.split(/<at_pos(1)>/).perl <p6eval> nom acbec8: OUTPUT«No type check cache and no type_check method in meta-object in method reify [...] <jnthn> How in the hell... <moritz> jnthn: indeed. <moritz> I get the same output locally * masak submits rakudobug <jnthn> OK, what is at_pos doing... :) <jnthn> Wild guess: using nqp::getattr somewhere it should be using nqp::getattr_i :) <moritz> erm, is it even spelled at_pos? <moritz> I might as well be misremembering something <masak> at the very least, it's an LTA error message. <p6eval> nom acbec8: OUTPUT«=> <> at => <>» <moritz> star: say 'foobar'.split(/<at(1)>/).perl <p6eval> star 2012.01: OUTPUT«("f", "oobar").list» <masak> \o/ <moritz> ok, it helps to spell it correctly :-) <jnthn> \o/ <masak> so, error is in using something that doesn't exist :) <masak> typical "programmer never tried this path" thinko :) <jnthn> nom: say Any.^methods <p6eval> nom acbec8: OUTPUT«eager elems end classify uniq infinite flat hash list pick roll reverse sort values keys kv pairs Array grep first join map min max minmax postcircumfix:<[ ]> at_pos all any one none postcircumfix:<{ }> reduce ACCEPTS» <masak> oh! <moritz> well, at_pos comes from Any <jnthn> There's an at_pos in Any <masak> right. <masak> so it does something completely different. <moritz> yes. <masak> and the regex engine gets sad. <jnthn> And doesn't return a cursor which...yes, that. :) <masak> I will report this as best I can :P So, at_pos returns something which the regex engine didn't expect, and instead of failing gracefully, it fails disgracefully. Please fix.