perl模块' www ::机械化:: chrome'不工作

发布于 2025-02-13 17:40:01 字数 906 浏览 0 评论 0 原文

我使用'www :: Mechanize :: Chrome'到Gen pdf。

use Log::Log4perl qw(:easy);
use WWW::Mechanize::Chrome;
my $chrome;
sub chrome {
    Log::Log4perl->easy_init($ERROR);
    my $mech = WWW::Mechanize::Chrome->new(
    headless      =>  1,
    'disable-gpu' =>  1,
    launch_exe    =>  'chromium-browser',
);

当我调用新的时,我有错误。如果要更深入,我们可以在797行的串联时看到错误。为什么会发生这种情况以及该怎么办?

I use'WWW::Mechanize::Chrome' to gen pdf.

use Log::Log4perl qw(:easy);
use WWW::Mechanize::Chrome;
my $chrome;
sub chrome {
    Log::Log4perl->easy_init($ERROR);
    my $mech = WWW::Mechanize::Chrome->new(
    headless      =>  1,
    'disable-gpu' =>  1,
    launch_exe    =>  'chromium-browser',
);

When I call new I have got the error.If to look deeper, we can see the error while concatenation at 797 line. Why is this happening and what to do about it?
the place where error happened

values of variables

error text

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

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

发布评论

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

评论(1

一世旳自豪 2025-02-20 17:40:01

您无法分配函数:

运行此示例,您将在第3行中遇到相同的错误:

sub test { }
sub left { }
left() .= test()

尤其是在这种情况下,您的调试器无法处理 lvalue subroutine

You can not assign to function:

Run this example and you will get same error on line 3:

sub test { }
sub left { }
left() .= test()

Particularly in this case your debugger can not process lvalue subroutine

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