The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

GDPR::IAB::TCFv2::RangeConsent - Transparency & Consent String version 2 range consent pair

SYNOPSIS

my $range = GDPR::IAB::TCFv2::RangeConsent->new(
    start => 10,
    end   => 20,
);

die "ops" unless $range->contains(15);

CONSTRUCTOR

Receive 2 parameters: start and end.

Will die if any parameter is missing.

Will die if start is bigger than end.

METHODS

contains

Return true if the id is present on the range [start, end]

my $ok = $range->contains(15);