trinity-users@lists.pearsoncomputing.net

Message: previous - next
Month: July 2018

Re: [trinity-users] info: in konqueror fails

From: Stefan Krusche <linux@...>
Date: Wed, 25 Jul 2018 13:36:36 +0200
Am Mittwoch 25 Juli 2018 schrieb Stefan Krusche:
> When I start this script in bash it throws this error:
> $ /opt/trinity/share/apps/tdeio_info/kde-info2html
> '/opt/trinity/share/apps/tdeio_info/kde-info2html.conf'
> '/opt/trinity/share/icons/crystalsvg/22x22/actions' 'coreutils' 'dd
> invocation'
> Can't use 'defined(@array)' (Maybe you should just omit the defined()?)
> at /opt/trinity/share/apps/tdeio_info/kde-info2html line 154.

In the script there is:

150          while (<DIR>) {
151                  next if $looking && !/\* Menu/;
152                  $looking = 0;
153                  my @item = &ParseMenuItem($_,'dir');
154                  if (!defined(@item)) { next }
155                  my ($MenuLinkTag, $MenuLinkFile, $MenuLinkRef, MenuLinkText) = @item;
156                  if ($MenuLinkRef eq $FileName) {
157                          &Redirect($MenuLinkFile, $MenuLinkTag);
158                          exit 0;
159                  }
160          }

Would it make sense to just do what the error message suggests, like this?:

154c154
<               if (!defined(@item)) { next }
---
>               if (!@item) { next }

Kind regards,
Stefan