Curses::UI - 列表框:注意:“不能使用字符串 (“Gino.Francescutti@xx”)”不包含完整的电子邮件,仅包含部分内容

发布于 2024-12-08 21:10:03 字数 480 浏览 1 评论 0原文

大部分信息都在这里: http://pastebin.com/VE6dhUkf

但一般错误是:

Odd number of elements in hash assignment at /usr/share/perl5/Curses/UI/Container.pm line 72.
Can't use string ("Gino.Francescutti@xx") as an ARRAY ref while "strict refs" in use at /usr/share/perl5/Curses/UI/Listbox.pm line 264.

注意: “无法使用字符串(“Gino.Francescutti@xx”)”不包含完整的电子邮件,仅包含部分内容。

Most of the information is here: http://pastebin.com/VE6dhUkf

But the general error is:

Odd number of elements in hash assignment at /usr/share/perl5/Curses/UI/Container.pm line 72.
Can't use string ("Gino.Francescutti@xx") as an ARRAY ref while "strict refs" in use at /usr/share/perl5/Curses/UI/Listbox.pm line 264.

Note: The "Can't use string ("Gino.Francescutti@xx")" Doesn't contain the full email, only partial.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

热风软妹 2024-12-15 21:10:03

我猜你混淆了数组和数组引用。你有这个:

my $listbox; $listbox = $win1->add(
    'list',
    'Listbox',
    -values => @marray,
    -lables => $lhash,
    -onchange => sub { exit($_[0]->get)}
);

注意 -values =>; @marray?那应该是 -values => \@marray。来自精细手册

my $listbox = $win->add(
    'mylistbox', 'Listbox',
    -values    => [1, 2, 3],
    #...
);

这种混淆并不直接指向您的错误消息,但它可能会严重扰乱 $win->add 所看到的内容,并将其混淆到足以导致您所看到的副作用的错误。

I'm guessing that you're mixing up your arrays and array-refs. You have this:

my $listbox; $listbox = $win1->add(
    'list',
    'Listbox',
    -values => @marray,
    -lables => $lhash,
    -onchange => sub { exit($_[0]->get)}
);

Notice the -values => @marray? That should be -values => \@marray. From the fine manual:

my $listbox = $win->add(
    'mylistbox', 'Listbox',
    -values    => [1, 2, 3],
    #...
);

That mixup doesn't directly point to your error message but it could sufficiently mess up what $win->add is seeing and confuse it enough to cause the error you're seeing as a side effect.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文