Hi!
I'm trying to get the TQt language bindings for porl working, but somehow I fail miserably:
$ pqtsh Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at /usr/lib/x86_64-linux-gnu/perl5/5.40/TQt/isa.pm line 48. Compilation failed in require at /usr/bin/pqtsh line 15. BEGIN failed--compilation aborted at /usr/bin/pqtsh line 15.
Removing saif "defined" and giving it another try:
$ pqtsh --- No method to call for : TQt::Application(ARRAY(0x55a9539e6068)) No close candidate found.
at /usr/bin/pqtsh line 652.
All example programs and tutorials from "libtqt-perl" fail with the same error message. So I'm asking if somebody has actually ever tried the perl language bindings for TDE and maybe remembers how to get them working?
Nik
On Sun, 27 Apr 2025 17:47:25 +0200 "Dr. Nikolaus Klepp via tde-devels" devels@trinitydesktop.org wrote:
I'm trying to get the TQt language bindings for porl working, but somehow I fail miserably:
$ pqtsh Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at /usr/lib/x86_64-linux-gnu/perl5/5.40/TQt/isa.pm line 48. Compilation failed in require at /usr/bin/pqtsh line 15. BEGIN failed--compilation aborted at /usr/bin/pqtsh line 15.
Removing saif "defined" and giving it another try:
$ pqtsh --- No method to call for : TQt::Application(ARRAY(0x55a9539e6068)) No close candidate found.
at /usr/bin/pqtsh line 652.
All example programs and tutorials from "libtqt-perl" fail with the same error message. So I'm asking if somebody has actually ever tried the perl language bindings for TDE and maybe remembers how to get them working?
Well, using defined() on arrays is no longer supported. Per man perlfunc, perl 5.40.0:
== Use of "defined" on aggregates (hashes and arrays) is no longer supported. It used to report whether memory for that aggregate had ever been allocated. You should instead use a simple test for size:
if (@an_array) { print "has array elements\n" } if (%a_hash) { print "has hash members\n" } ==
I'm not sure what version this changed in, but my guess is that it's been gone for quite a while. It follows that the version of perl this was meant to work against is probably more than a decade old. So the code needs updating.
E. Liddell
Anno domini 2025 Sun, 27 Apr 19:25:09 -0400 E. Liddell via tde-devels scripsit:
On Sun, 27 Apr 2025 17:47:25 +0200 "Dr. Nikolaus Klepp via tde-devels" devels@trinitydesktop.org wrote:
I'm trying to get the TQt language bindings for porl working, but somehow I fail miserably:
$ pqtsh Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at /usr/lib/x86_64-linux-gnu/perl5/5.40/TQt/isa.pm line 48. Compilation failed in require at /usr/bin/pqtsh line 15. BEGIN failed--compilation aborted at /usr/bin/pqtsh line 15.
Removing saif "defined" and giving it another try:
$ pqtsh --- No method to call for : TQt::Application(ARRAY(0x55a9539e6068)) No close candidate found.
at /usr/bin/pqtsh line 652.
All example programs and tutorials from "libtqt-perl" fail with the same error message. So I'm asking if somebody has actually ever tried the perl language bindings for TDE and maybe remembers how to get them working?
Well, using defined() on arrays is no longer supported. Per man perlfunc, perl 5.40.0:
Yes, the "defined" part is easy to solve. But this is beyond my current perl level:
--- No method to call for : TQt::Application(ARRAY(0x55a9539e6068))
That's why I ask if anybody has seen the perl language bindings actually working .. and which decade it was :) At the moment libtqt-perl builds but does not work.
Nik
== Use of "defined" on aggregates (hashes and arrays) is no longer supported. It used to report whether memory for that aggregate had ever been allocated. You should instead use a simple test for size:
if (@an_array) { print "has array elements\n" } if (%a_hash) { print "has hash members\n" }
==
I'm not sure what version this changed in, but my guess is that it's been gone for quite a while. It follows that the version of perl this was meant to work against is probably more than a decade old. So the code needs updating.
E. Liddell ____________________________________________________ tde-devels mailing list -- devels@trinitydesktop.org To unsubscribe send an email to devels-leave@trinitydesktop.org Web mail archive available at https://mail.trinitydesktop.org/mailman3/hyperkitty/list/devels@trinitydeskt...
On Mon, 28 Apr 2025 19:23:51 +0200 "Dr. Nikolaus Klepp via tde-devels" devels@trinitydesktop.org wrote:
Anno domini 2025 Sun, 27 Apr 19:25:09 -0400 E. Liddell via tde-devels scripsit:
On Sun, 27 Apr 2025 17:47:25 +0200 "Dr. Nikolaus Klepp via tde-devels" devels@trinitydesktop.org wrote:
I'm trying to get the TQt language bindings for porl working, but somehow I fail miserably:
$ pqtsh Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at /usr/lib/x86_64-linux-gnu/perl5/5.40/TQt/isa.pm line 48. Compilation failed in require at /usr/bin/pqtsh line 15. BEGIN failed--compilation aborted at /usr/bin/pqtsh line 15.
Removing saif "defined" and giving it another try:
$ pqtsh --- No method to call for : TQt::Application(ARRAY(0x55a9539e6068)) No close candidate found.
at /usr/bin/pqtsh line 652.
All example programs and tutorials from "libtqt-perl" fail with the same error message. So I'm asking if somebody has actually ever tried the perl language bindings for TDE and maybe remembers how to get them working?
Well, using defined() on arrays is no longer supported. Per man perlfunc, perl 5.40.0:
Yes, the "defined" part is easy to solve. But this is beyond my current perl level:
--- No method to call for : TQt::Application(ARRAY(0x55a9539e6068))
That's why I ask if anybody has seen the perl language bindings actually working .. and which decade it was :) At the moment libtqt-perl builds but does not work.
It's above my level as well, since the parts of this I can trace seem to be down in the weeds of object orientation and the C(++?) bindings. There *is* a "sub TQt::Application::NEW" that appears to take an array composed of two or more scalars, but it blesses another object whose definition I can't find that must be over on the C side.
There's a very small, 7-line "Hello World" example in the documentation that doesn't seem to be present in the "examples" directory ( https://git.trinitydesktop.org/cgit/libtqt-perl/tree/doc/en/PerlQt.pod starting at line 177). Maybe that's a better starting point than the more complex examples. If even that won't run, this is probably hopeless.
(I wish I could be more help, but this particular TDE extra bit hasn't been packaged for my distro, making it difficult to test.)
E. Liddell