in reply to Can't call method "proxy" on an undefined value at
You're trying to call the method proxy() on the object $ua (with $ua->proxy('http', $prx)) before you've initialized the object.
You've conflated what should be two separate lines:
See the docs for LWP::UserAgent's proxy attributes.my $ua = ... ; # constructor $ua->proxy( ... ) ; # subsequent method call
Also see the docs for my(), which is used to declare variables.
my $foo->bar('baz'); # will never compile
Hope this helps!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Can't call method "proxy" on an undefined value at
by Anonymous Monk on Feb 09, 2016 at 05:32 UTC | |
by NetWallah (Canon) on Feb 09, 2016 at 05:54 UTC | |
by Anonymous Monk on Feb 09, 2016 at 06:32 UTC | |
by NetWallah (Canon) on Feb 09, 2016 at 06:50 UTC | |
by Anonymous Monk on Feb 09, 2016 at 07:27 UTC | |
|