Ok I did the force install.
Now I tried the following code:
use strict;
use warnings;
use Data::Dumper;
$ENV{MOZREPL} = "localhost:8888"; # using a non-standard port since 4
+242 is used by ncui
use HTTP::Cookies::MozRepl;
my $repl = MozRepl::RemoteObject->install_bridge();
my $document = $repl->expr('document');
print $document->{title};
This prints out the correct title: Junos Pulse Secure Access Service - Home - Mozilla Firefox
So I added:
my $cookie_jar = HTTP::Cookies::MozRepl->new(
repl => $repl
);
my @cookies = $cookie_jar->extract_cookies();
print Dumper \@cookies;
Now it just hangs there, it doesn't even print the title.
Any ideas what am I doing wrong?
Thanks in advance. |