diff --git a/lib/GDPR/IAB/TCFv2.pm b/lib/GDPR/IAB/TCFv2.pm index 71a02ab..4b6b464 100644 --- a/lib/GDPR/IAB/TCFv2.pm +++ b/lib/GDPR/IAB/TCFv2.pm @@ -120,15 +120,7 @@ sub Parse { croak 'invalid vendor list version' if $self->vendor_list_version == 0; - # parse vendor section - # parse vendor consent - - my $legitimate_interest_offset = $self->_parse_vendor_consents(); - - # parse vendor legitimate interest - - my $pub_restrict_offset = - $self->_parse_vendor_legitimate_interests($legitimate_interest_offset); + my $pub_restrict_offset = $self->_parse_vendor_section(); # parse publisher section @@ -416,6 +408,21 @@ sub TO_JSON { }; } +sub _parse_vendor_section { + my $self = shift; + + # parse vendor consent + + my $legitimate_interest_offset = $self->_parse_vendor_consents(); + + # parse vendor legitimate interest + + my $pub_restrict_offset = + $self->_parse_vendor_legitimate_interests($legitimate_interest_offset); + + return $pub_restrict_offset; +} + sub _parse_vendor_consents { my $self = shift;