-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from wdpypere/17.2.0
17.2.0 documentation
- Loading branch information
Showing
37 changed files
with
1,144 additions
and
400 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
|
||
### NAME | ||
|
||
`CAF::Download::LWP` class to use `LWP` (and `Net::HTTPS`). | ||
|
||
### DESCRIPTION | ||
|
||
`CAF::Download::LWP` prepares `LWP` (and `Net::HTTPS`) and | ||
provides interface to `LWP::UserAgent`. | ||
|
||
Remarks wrt SSL/TLS: | ||
|
||
- If LWP is recent enough (v8.333, e.g. on EL6+), | ||
the choice of SSL module will be the system default | ||
(typically `IO::Socket::SSL` when available, `Net::SSL` otherwise). | ||
|
||
The usual environment variable will not be honoured | ||
(this module will typically be executed in a minimal environment anyway). | ||
|
||
When LWP is too old, `Net::SSL` will be forced (e.g. on EL5). | ||
|
||
- If LWP is recent enough and `IO::Socket::SSL` is the default, | ||
hostname verification is forced. | ||
|
||
### METHODS | ||
|
||
- `_initialize` | ||
|
||
Initialize the object. | ||
|
||
Optional arguments: | ||
|
||
- `log` | ||
|
||
A [Reporter](../CAF/Reporter.md) object to log to. | ||
|
||
- \_get\_ua | ||
|
||
Prepare the environment and initialise `LWP::UserAgent`. | ||
Best-effort to handle ssl setup, `Net::SSL` vs `IO::Socket::SSL` | ||
and `verify_hostname`. | ||
|
||
Example usage | ||
... | ||
my $ua = $self->\_get\_ua(%opts); | ||
|
||
local %ENV = %ENV; | ||
$self->update_env(\%ENV); | ||
... | ||
|
||
Returns the `LWP::UserAgent` instance or undef. | ||
|
||
Options | ||
|
||
- cacert: the CA file | ||
- cadir: the CA path | ||
- cert: the client certificate filename | ||
- key: the client certificate private key filename | ||
- ccache: the kerberos crednetial cache | ||
- timeout: set timeout | ||
|
||
- \_do\_ua | ||
|
||
Initialise `LWP::UserAgent` using `_get_ua` method | ||
and run `method` with arrayref `args`. | ||
|
||
All named options are passed to `_get_ua`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.