yep but as you said it's only runtime.

But it should be feasible to write a an op-code walker catching them at compile time in the UNITCHECK phase.

D:\>perl -MO=Terse -E "use strict; say @@" LISTOP (0x2820630) leave [1] OP (0x2820600) enter COP (0x2820670) nextstate LISTOP (0x2820700) say OP (0x28206d0) pushmark UNOP (0x2820740) rv2av [2] <-- array PADOP (0x2820778) gv GV (0x1dede0) *@ <-- of glob *@ -e syntax OK D:\>perl -MO=Concise -E "use strict; say @@" 7 <@> leave[1 ref] vKP/REFC ->(end) 1 <0> enter ->2 2 <;> nextstate(main 48 -e:1) v:%,*,&,{,x*,x&,x$,$,469764096 ->3 6 <@> say vK ->7 3 <0> pushmark s ->4 5 <1> rv2av[t2] lK/3 ->6 <-- array 4 <#> gv[*@] s ->5 <-- of glob *@ -e syntax OK

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery FootballPerl is like chess, only without the dice


In reply to Re^4: Code Loop? by LanX
in thread Code Loop? by bitman

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.