my $service = My::Interface->new; my $endpoint = $service->get_endpoint; $endpoint =~ s!://!://$user:$pass@!; $service->proxy($endpoint);