I don't know about xquartz (as I said I don't own a Mac so I'm not familiar with what xquartz is), but you would have to install xorg from MacPorts like this:

sudo port install xorg
sudo port install p5-tk

that's taken from the macOS installation instructions for my application, these instructions were written for me by another macOS user (with an Intel Mac though).
http://obd-amigos.linuxtech.net/files/00-How_to_install_OBD_Amigos_on_macOS.html

Since these are MacPorts packages, isn't it quite easy to uninstall them cleanly again after the test, if you have no need for them?

Thanks for the one-liner test but unfortunately it's not as simple as that to trigger this issue, I also gave the user of my application a similar one-liner (but with eval) at first, without triggering the issue. I have a feeling that Tk is needed to trigger the issue.

In reply to Re^3: weird problem with macports perl on apple m1/m2 based system by perltux
in thread weird problem with macports perl on apple m1/m2 based system by perltux

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.