in reply to Re: Can't call method "extract_cookies" on an undefined value
in thread Can't call method "extract_cookies" on an undefined value

That helped. Now I am getting an even sillier error:

Can't call method "extract_cookies" on unblessed reference at ./GetJavaTest.pl line 53 (#1)

changing line 53 to:

$cookie_jar->HTTP::Cookies::extract_cookies($response);

give the same error:

 Can't call method "HTTP::Cookies::extract_cookies" on unblessed reference at ./GetJavaTest.pl line 53.

What is an "unblessed reference" anyway?

Replies are listed 'Best First'.
Re^3: Can't call method "extract_cookies" on an undefined value
by Todd Chester (Scribe) on Oct 17, 2015 at 05:47 UTC

    When I look at the web page it downloads, I find

    writeSessionCookie( 'oraclelicense', 'accept-securebackup-cookie' );

    in it

    Be nice if I could just add the cookie directly, like I can do with wget.

      $ua = LWP::UserAgent->new; $ua->cookie_jar ($cookie_jar={}); # instead of $ua->cooki +e_jar ( +{} ); $request = HTTP::Request->new('GET', "$RevAddr" ); print "\$request = ", $request, "\n"; print Dumper ($request), "\n";

      $request = HTTP::Request=HASH(0x1080540) $VAR1 = bless( { '_content' => '', '_uri' => bless( do{\(my $o = 'http://www.ora +cle.com/ +technetwork/java/javase/downloads/jre7-downloads-1880261.html +')}, 'UR +I::http' ), '_headers' => bless( {}, 'HTTP::Headers' ), '_method' => 'GET' }, 'HTTP::Request' );

      What am I doing wrong?