Check Tcl/Tk using Tcl.pm from Makefile.PL?

[email protected] (Christopher Chavez) Sat, 18 Jul 2020 12:37:08 -0500
Newsgroups perl.tcltk
Message-ID <[email protected]>
I often have multiple Tcl/Tk installations on a system for testing
purposes, and quite a few times I have accidentally specified --tclsh
for the wrong Tcl/Tk installation to Tcl::pTk, rather than whichever one
Tcl.pm is currently using.

I wonder if this could be prevented: when installing Tcl.pm dependents
(Tcl::pTk, Tcl::Tk, etc.), why not have them go through Tcl.pm to check
for Tcl/Tk versions and extensions, rather than relying on a
possibly-incorrect path to tclsh? Would it be okay for Tcl.pm dependents
to `require Tcl` from inside Makefile.PL (only when the --test-for-tk
check is requested), or is it considered universally "bad" for
Makefile.PL files to try using dependencies this way? Was there a reason
this approach was not used in the first place?


Christopher A. Chavez