Followup, since it&#x27;s too long since my reply to edit:<p>How are you assuming Inline::Perl5 works?  Did you look into it and these are issues you found, or are these from how you assume it works?<p>Inline::Perl5 spins up an embedded perl5 interpreter (libperl I assume), and handles the data marshaling transparently.  I <i>assume</i> (having not looked too closely at it&#x27;s implementation), that it&#x27;s sort of like a reverse XS.  It looks into the perl5 guts, runs perl5 code, and exposes variables and functions to Perl 6.  I see no reason to assume it wouldn&#x27;t be using SVREFCNT_int and SVREFCNT_dec or equivalents as needed on scope changes to handle this.<p>In fact, looking at the Inline::perl5 repo now, it appears they are doing quite a bit with the refcnt functions[1].<p>1: <a href="https:&#x2F;&#x2F;github.com&#x2F;niner&#x2F;Inline-Perl5&#x2F;search?utf8=%E2%9C%93&amp;q=refcnt&amp;type=Code" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;niner&#x2F;Inline-Perl5&#x2F;search?utf8=%E2%9C%93&amp;...</a>