Subject: | Do not connect to display upon "use Wx" |
Hello,
I'm using the following common idiom to find out the version of
module Wx:
perl -MWx -e 'print "$Wx::VERSION\n"'
The -MWx or "use Wx" initializes libgtk, including an attempt to
connect to the display. This can generate an error when working on
terminal without graphical display available (or in a headless build
environment). Or, when $DISPLAY points to a display behind a slow
connection, the above command can take some time.
I think that the full initialization of libgtk and connecting to the
display should be delayed, so that the above simple example does not
include the potentially expensive attempt to connect to the display.
Yours, Stepan Kasal