choroba I got along further with this morning's attempt. I used the old classic perl Makefile.PL; make; make test; and got as far as:

"/Users/nick/perl5/perlbrew/perls/perl-5.40.1/bin/perl" "-I../t" "-MTk +Test" "-e" "checked_test_harness('../xt', 0, '../blib/lib', '../blib/ +arch')" t/*.t t/basic.t .. 1/5


Following the advice in Re: UPDATE 2: Problem Installing Perl-Tk on macOS Monterey (12.6) with Apple M1 chip I renamed the two test files in ./PNG/t and the test suite ran to completion. The output was:

Test Summary Report ------------------- t/listbox.t (Wstat: 0 Tests: 537 Failed: 0) TODO passed: 320-322, 328, 502 t/photo.t (Wstat: 11 (Signal: SEGV) Tests: 1 Failed: +0) Non-zero wait status: 11 Parse errors: Bad plan. You planned 111 tests but ran 1. t/text.t (Wstat: 0 Tests: 415 Failed: 0) TODO passed: 121 t/wm-tcl.t (Wstat: 0 Tests: 315 Failed: 0) TODO passed: 64, 86-87, 154-159, 164-165, 171-178, 221-224 237-239, 264-267, 275-276, 280-283, 300 t/zzScrolled.t (Wstat: 0 Tests: 94 Failed: 0) TODO passed: 52, 66, 80, 94 Files=76, Tests=4257, 62 wallclock secs ( 0.32 usr 0.16 sys + 9.52 c +usr 1.97 csys = 11.97 CPU) Result: FAIL Failed 1/76 test programs. 0/4257 subtests failed. make: *** [test_dynamic] Error 255
I never saw any errors though, so I ran make install and it succeeded.

I was then able to run the hello, world program:

#!/usr/bin/perl use strict; use warnings; use Tk; my $mw = MainWindow->new; $mw->title("Hello World"); $mw->Button(-text + => "Done", -command => sub { exit })->pack; MainLoop;

Hope this helps!


The way forward always starts with a minimal test.

In reply to Re^7: Perl Tk on a Mac by 1nickt
in thread Perl Tk on a Mac by choroba

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.