fix: UNIVERSAL::can list parity + concat encoding; Sub::HandlesVia plan#743
Closed
fglock wants to merge 3 commits into
Closed
fix: UNIVERSAL::can list parity + concat encoding; Sub::HandlesVia plan#743fglock wants to merge 3 commits into
fglock wants to merge 3 commits into
Conversation
7053ad5 to
79a6728
Compare
Owner
Author
|
Update (regressions): The |
…andling Failures from can() returned an empty list, corrupting Mite __META__ hash literals and breaking Sub::HandlesVia constructor dispatch. Returned values now use singleton undef matching Perl list semantics. Add RuntimeScalar(String, int stringType) and route concatenation helpers through explicit STRING vs BYTE_STRING selection. Document Sub::HandlesVia next steps under dev/modules/. Generated with Cursor (https://cursor.com/docs) Co-Authored-By: Cursor <noreply@cursor.com> Co-authored-by: Cursor <cursoragent@cursor.com>
StringOperators stringConcat* and RuntimeScalar(String,int) regressed perl5_t smoke (op/sub.t, porting/filenames.t, re/pat_advanced.t). Restore the prior concat implementation; retain scalarUndef.getList() on failed can() for Mite. Update design + dev/modules docs with the revert and a safer redo checklist. Generated with Cursor (https://cursor.com/docs) Co-Authored-By: Cursor <noreply@cursor.com> Co-authored-by: Cursor <cursoragent@cursor.com>
0af8d22 to
5d90443
Compare
Returning a singleton undef on every can() miss fixed Mite list/hash pairings but confused compile-time probe sites that expect an empty RuntimeList (VERSION/import/MODIFY_* checks). Use list-context undef only when ctx is LIST; keep an empty list for scalar-like contexts (scalar() still undef). Updated design notes and Sub::HandlesVia tracking doc. Generated with Cursor (https://cursor.com/docs) Co-Authored-By: Cursor <noreply@cursor.com> Co-authored-by: Cursor <cursoragent@cursor.com>
fglock
added a commit
that referenced
this pull request
May 15, 2026
Unify both lines of work for combined testing before merge to master.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
UNIVERSAL::can — When no method exists, Perl returns
(undef)in list context (one-element list). PerlOnJava previously returned an empty list, which breaks implicit hash literals (the next pairing is consumed). Mite__META__then misclassifiedHAS_BUILDARGS, andSub::HandlesVia::CodeGenerator->newtook the bogusBUILDARGSpath. Failures now returnscalarUndef.getList().String SvUTF8 parity — Added
RuntimeScalar(String, int stringType)and updatedstringConcat,stringConcatWarnUninitialized, andstringConcatNoOverloadto assignSTRINGvsBYTE_STRINGfrom operands and wide-character scans (seedev/design/utf8_flag_parity.md).Planning doc —
dev/modules/sub_handlesvia_support.mdrecords completed fixes and P0–P3 next steps (\x{c2}failure insideEval::TypeTiny::eval_closure, fulljcpanrun, regression-test coordination).dev/modules/README.mdindexes the doc.Design notes:
dev/design/string_encoding_context_plan.md(investigation correction),dev/design/utf8_flag_parity.md(sections 2b/2c).Test plan
makeSub::HandlesVia::CodeGenerator->__META__hasHAS_FOREIGNBUILDARGSandHAS_BUILDARGS(undef) after loadtimeout 3600 ./jcpan -t Sub::HandlesVia(optional; lengthy)timeout 900 ./jperl -Iblib/lib …/Sub-HandlesVia/t/02moo.t