+/* Return a temporary SV containing a stringified representation of
+ * the op_aux field of a MULTICONCAT op. Note that if the aux contains
+ * both plain and utf8 versions of the const string and indices, only
+ * the first is displayed.
+ */
+
+SV*
+Perl_multiconcat_stringify(pTHX_ const OP *o)
+{
+ UNOP_AUX_item *aux = cUNOP_AUXo->op_aux;
+ UNOP_AUX_item *lens;
+ STRLEN len;
+ SSize_t nargs;
+ char *s;
+ SV *out = newSVpvn_flags("", 0, SVs_TEMP);
+
+ PERL_ARGS_ASSERT_MULTICONCAT_STRINGIFY;
+
+ nargs = aux[PERL_MULTICONCAT_IX_NARGS].ssize;
+ s = aux[PERL_MULTICONCAT_IX_PLAIN_PV].pv;
+ len = aux[PERL_MULTICONCAT_IX_PLAIN_LEN].ssize;
+ if (!s) {
+ s = aux[PERL_MULTICONCAT_IX_UTF8_PV].pv;
+ len = aux[PERL_MULTICONCAT_IX_UTF8_LEN].ssize;
+ sv_catpvs(out, "UTF8 ");
+ }
+ pv_pretty(out, s, len, 50,
+ NULL, NULL,
+ (PERL_PV_PRETTY_NOCLEAR
+ |PERL_PV_PRETTY_QUOTE
+ |PERL_PV_PRETTY_ELLIPSES));
+
+ lens = aux + PERL_MULTICONCAT_IX_LENGTHS;
+ while (nargs-- >= 0) {
+ Perl_sv_catpvf(aTHX_ out, ",%" IVdf, (IV)lens->ssize);
+ lens++;
+ }
+ return out;
+}
+
+