Log4perl: Seems like no initialization happened. Forgot to call init()?
23:28:21 Sent 'Target.closeTarget' message $VAR1 = '{"id":11,"params":{"targetId":"F75959D2137237798CF1FCB89E87FFAA"},"method":"Target.closeTarget"}';
23:28:21 Can't call method "irand" on an undefined value at (eval 140) line 17 during global destruction.
####
#!/usr/bin/env perl
use Test::More;
use WWW::Mechanize::Chrome;
use Log::Log4perl qw(:easy);
# This is for the mech obj, Set priority of root logger to ERROR
Log::Log4perl->easy_init($ERROR);
my %default_mech_params = (
headless => 1,
# log => $mylogger,
launch_arg => [
'--window-size=600x800',
'--password-store=basic', # do not ask me for stupid chrome account password
# '--remote-debugging-port=9223',
# '--enable-logging', # see also log above
'--disable-gpu',
'--no-sandbox',
'--ignore-certificate-errors',
'--disable-background-networking',
'--disable-client-side-phishing-detection',
'--disable-component-update',
'--disable-hang-monitor',
'--disable-save-password-bubble',
'--disable-default-apps',
'--disable-infobars',
'--disable-popup-blocking',
],
);
my $mech_obj = WWW::Mechanize::Chrome->new(%default_mech_params);
ok(defined($mech_obj), "WWW::Mechanize::Chrome->new() : called.") or BAIL_OUT("failed to create WWW::Mechanize::Chrome object");
done_testing();
##
##
Manifying 1 pod document
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/xx.t .. 1/? Log4perl: Seems like no initialization happened. Forgot to call init()?
2025/08/11 23:40:43 Sent 'Target.closeTarget' message $VAR1 = '{"method":"Target.closeTarget","id":11,"params":{"targetId":"FF3672A330F5788556F1B4B18CCC5610"}}';
2025/08/11 23:40:43 Can't call method "irand" on an undefined value at (eval 140) line 17 during global destruction.
t/xx.t .. Dubious, test returned 255 (wstat 65280, 0xff00)
All 1 subtests passed
Test Summary Report
-------------------
t/xx.t (Wstat: 65280 (exited 255) Tests: 1 Failed: 0)
Non-zero exit status: 255
Files=1, Tests=1, 11 wallclock secs ( 0.03 usr 0.00 sys + 0.41 cusr 0.12 csys = 0.56 CPU)
Result: FAIL
Failed 1/1 test programs. 0/1 subtests failed.
make: *** [Makefile:873: test_dynamic] Error 255