diff --git a/lib/GDPR/IAB/TCFv2.pm b/lib/GDPR/IAB/TCFv2.pm index cfa5a0b..5c47214 100644 --- a/lib/GDPR/IAB/TCFv2.pm +++ b/lib/GDPR/IAB/TCFv2.pm @@ -318,13 +318,13 @@ sub _parse_publisher_restrictions { $current_offset ); - $restrictions{$purpose_id} //= {}; + $restrictions{$purpose_id} = {} if !defined $restrictions{$purpose_id}; + $restrictions{$purpose_id}->{$restriction_type} = $vendor_restrictions; $current_offset = $next_offset; } - my $publisher_restrictions = GDPR::IAB::TCFv2::PublisherRestrictions->new( restrictions => \%restrictions, ); diff --git a/t/01-parse.t b/t/01-parse.t index 3995f1a..31b38c0 100644 --- a/t/01-parse.t +++ b/t/01-parse.t @@ -364,7 +364,7 @@ subtest "check publisher restriction" => sub { done_testing; }; - done_testing; + done_testing; }; subtest "invalid tcf consent string candidates" => sub {