I doubt a translation is easily feasable.

IIRC (not sure) does tkx provide an abstraction to write TCL semantically in Perl.

Perl/Tk on the other hand is a OO framework interfacing with the underlying C bindings to the Tk lib, hence bypassing TCL.

While the latter is the cleaner approach it hasn't been updated to newer versions of Tk, while Tkx doesn't need to, cause TCL commands are generated and send over a bridge.

If you think a code translation is possible, then I'd rather opt for a new class framework with same interface, but generating TCL like tkx does. (Doesn't such a project already exist?)²

Keep in mind that TCL is very lisp like, just where in lisp-dogma everything is a list, TCL -dogma makes everything a whitespace separated string.

Not an expert. .. HTH!

See also Perl TK

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!

Update

²) indeed, Tcl::pTk ! AnoMonk++


In reply to Re: Is there a Tk to Tkx translator script? by LanX
in thread Is there a Tk to Tkx translator script? by hsfrey

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.