Skip to content

Instantly share code, notes, and snippets.

@mpapec
Last active July 28, 2016 12:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mpapec/69e01fd9afeff73e0722e2f6bd4f59cc to your computer and use it in GitHub Desktop.
Save mpapec/69e01fd9afeff73e0722e2f6bd4f59cc to your computer and use it in GitHub Desktop.
map { $options{"tls_$_"} = $self->$_ } qw(ca cert key)
if ($options{tls} = $proto eq 'https');
# vs.
$options{tls} = $proto eq 'https';
if ($options{tls}) {
$options{"tls_$_"} = $self->$_ for qw(ca cert key);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment