in reply to Re: HTTP::Tiny losing headers for Stripe
in thread HTTP::Tiny losing headers for Stripe
How do you make a copy of $headers?
Simply by assigning it to a new variable and using that...
my $headers = { 'headers' => { 'Authorization' => 'Bearer ' . $Site::Variables::stripe_secret +, }, 'agent' => 'Wayfinder/v3.0', }; my $head = $headers;
UPDATE:
Thinking about it, this only creates a copy of the reference and not a copy of the underlying hash...
Looks like I need to utilise something like Clone instead.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: HTTP::Tiny losing headers for Stripe
by bliako (Abbot) on Jun 27, 2022 at 11:11 UTC |