From 0fc9d496efc237f8dbd662b832de902d9910a705 Mon Sep 17 00:00:00 2001 From: Tiago Peczenyj Date: Tue, 5 Dec 2023 21:16:06 +0100 Subject: [PATCH] release version 0.051 --- Changes | 6 +++++- MANIFEST | 2 +- Makefile.PL | 3 +-- lib/GDPR/IAB/TCFv2.pm | 36 +++++++++++++++++++++--------------- 4 files changed, 28 insertions(+), 19 deletions(-) diff --git a/Changes b/Changes index f6f5540..2bff19f 100644 --- a/Changes +++ b/Changes @@ -1,10 +1,14 @@ -v0.05 +v0.051 - remove dependency List::MoreUtils - make sure the code will work on perl 5.8 - make sure the code will work on 32 bits - make sure the code will work on newer versions of perl where MIME::Base64 supports base64 url format - change version schema - some small refactors + - doc fixes + +v0.05 + - almost the same as v0.051 v0.0.4 - fix issue with pack Q on 32 bits environment diff --git a/MANIFEST b/MANIFEST index 2fd8035..a1a2b1d 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1,5 +1,5 @@ Changes -CONTRIBUTING.md +CONTRIBUTING.pod lib/GDPR/IAB/TCFv2.pm lib/GDPR/IAB/TCFv2/BitField.pm lib/GDPR/IAB/TCFv2/BitUtils.pm diff --git a/Makefile.PL b/Makefile.PL index cc0bcee..3de4cc1 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -2,7 +2,7 @@ use ExtUtils::MakeMaker; WriteMakefile( NAME => 'GDPR::IAB::TCFv2', - AUTHOR => 'Tiago Peczenyj ', + AUTHOR => 'Tiago Peczenyj ', LICENSE => "perl_5", ABSTRACT_FROM => 'lib/GDPR/IAB/TCFv2.pm', VERSION_FROM => 'lib/GDPR/IAB/TCFv2.pm', @@ -11,7 +11,6 @@ WriteMakefile( 'Test::Exception' => 0.43, 'Test::More' => 0.94, }, - SKIP => [qw<.github>], ( eval { ExtUtils::MakeMaker->VERSION(6.46) } ? ( META_MERGE => { 'meta-spec' => { version => 2 }, diff --git a/lib/GDPR/IAB/TCFv2.pm b/lib/GDPR/IAB/TCFv2.pm index c03a5cb..284c71a 100644 --- a/lib/GDPR/IAB/TCFv2.pm +++ b/lib/GDPR/IAB/TCFv2.pm @@ -5,7 +5,7 @@ use warnings; use integer; use bytes; -our $VERSION = "0.05"; +our $VERSION = "0.051"; use GDPR::IAB::TCFv2::BitUtils qw; @@ -299,7 +299,7 @@ GDPR::IAB::TCFv2 - Transparency & Consent String version 2 parser =head1 VERSION -Version 0.05 +Version 0.051 =head1 SYNOPSIS @@ -307,35 +307,39 @@ The purpose of this package is to parse Transparency & Consent String (TC String use strict; use warnings; - use feature 'say'; + use GDPR::IAB::TCFv2; my $consent = GDPR::IAB::TCFv2->Parse( 'CLcVDxRMWfGmWAVAHCENAXCkAKDAADnAABRgA5mdfCKZuYJez-NQm0TBMYA4oCAAGQYIAAAAAAEAIAEgAA.argAC0gAAAAAAAAAAAA' ); + use feature qw; + say $consent->version; # 2 - say $consent->created; # epoch 1228644257 - say $consent->last_updated; # epoch 1326215413 - say $consent->cmp_id; # 21 + say $consent->created; # epoch 1228644257 or 07/12/2008 + say $consent->last_updated; # epoch 1326215413 or 10/01/2012 + say $consent->cmp_id; # 21 - Traffective GmbH say $consent->cmp_version; # 7 say $consent->consent_screen; # 2 say $consent->consent_language; # "EN" say $consent->vendor_list_version; # 23 - use List::Util qw(all); + use List::MoreUtils qw; - say "consent ok for purpose ids 1, 3, 9 and 10" if all { + say "find consent for purpose ids 1, 3, 9 and 10" if all { $consent->is_purpose_consent_allowed($_) } (1, 3, 9, 10); - say "weborama (vendor id 284) has consent" if $consent->vendor_consent(284); + say "find consent for vendor id 284 (Weborama)" if $consent->vendor_consent(284); =head1 ACRONYMS -GDPR: General Data Protection Regulation L -IAB: Interactive Advertising Bureau L -TCF: The Transparency & Consent Framework L +L: General Data Protection Regulation + +L: Interactive Advertising Bureau + +L: The Transparency & Consent Framework =head1 CONSTRUCTOR @@ -343,6 +347,8 @@ TCF: The Transparency & Consent Framework L immutable object that allow easy access to different properties. + Will die if can't decode the string. use GDPR::IAB::TCFv2; @@ -438,15 +444,15 @@ The legitimate interest value for each Vendor ID =head2 looksLikeIsConsentVersion2 -Will check if a given tc string starts with a literal "C". +Will check if a given tc string starts with a literal C. =head1 SEE ALSO -You can find the original documentation of the TCF v2 from IAB documentation L. +The original documentation of the L. =head1 AUTHOR -Tiago Peczenyj (tiago dot peczentj at gmail dot com) +Tiago Peczenyj L =head1 BUGS