Subject: | Repository API methods are awkward because they don't take repository as an argument |
Date: | Mon, 1 Aug 2016 14:51:48 -0700 |
To: | <bug-Artifactory-Client [...] rt.cpan.org> |
From: | Tony Monroe <tony.monroe [...] adesa.com> |
Specifically, I was hoping to do this:
$client->calculate_yum_repository_metadata($repository, async => 1);
But because I didn't construct my Artifactory::Client object with a
specific repository from the beginning, I have to do some awkward
workarounds involving _set_repository...
my $prev_repo = $self->client->repository;
$client->_set_repository($destination);
$client->calculate_yum_repository_metadata(async => 1);
$client->_set_repository($prev_repo);
...but you'd probably prefer I respected the API. Given the opportunity
I would have, but this appears to be the most reasonable way of getting
this done without using one of the generic methods (post, get, etc.).
My application could possibly deal with multiple repositories across the
lifetime of a single Artifactory::Client object, so restricting myself
to one at object construction time is impractical.
Perhaps the various methods dealing directly with repositories could be
revised to take repositories as arguments.
-- tony
*************************************
The information transmitted herewith is confidential and sensitive information intended only for use to the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon, this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.
**************************************