UPDATE: I created my own private copy of basic.t and added some stderr debugging statements, then tried running it by hand from the PNG directory. Ran it many times, and it mostly fails with a segmentation fault, but it also will sometimes hang as I said before. Here is an example of when it segfaults:
$ cd /Users/cmv/.cpan/build/Tk-804.036-0/PNG $ /opt/homebrew/Cellar/perl/5.36.0/bin/perl -w t/cmv.t 1..5 ok 1 - use Tk::PNG; Photo 1 zsh: segmentation fault /opt/homebrew/Cellar/perl/5.36.0/bin/perl -w +t/cmv.t

Here are some relavent lines from my cmv.t file

... use_ok('Tk::PNG'); my $file = (@ARGV) ? shift : "$FindBin::RealBin/../pngtest.png"; my $mw = MainWindow->new; $mw->geometry('+10+10'); $mw->update; #### Added by --cmv sleep 10; { print STDERR "Photo 1\n"; #### Added by --cmv my $image = $mw->Photo('-format' => "png", -file => $file); print STDERR "Photo 2\n"; #### Added by --cmv ok($image, "Loaded PNG image from $file"); print STDERR "Photo 3\n"; #### Added by --cmv $mw->Label(-image => $image)->pack; print STDERR "Photo 4\n"; #### Added by --cmv $mw->update; print STDERR "Photo 5\n"; #### Added by --cmv } ...

Note 1: The $mw->update; line does cause the Tk mainwindow to show up on my screen!!!

Note 2: The problem seems to be loading the PNG photo. More digging needed here.

Many thanks to all who have provided pointers and help!

-Craig


In reply to UPDATE: Problem Installing Perl-Tk on macOS Monterey (12.6) with Apple M1 chip by cmv
in thread Problem Installing Perl-Tk on macOS Monterey (12.6) with Apple M1 chip by cmv

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.