| 1 | package GDPR::IAB::TCFv2::Constants::SpecialFeature 0.512; | ||
| 2 | 2 | ▶ | use v5.12; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 2 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | |||
| 5 | 2 | require Exporter; | |
| 6 | 2 | ▶ | use parent qw<Exporter>; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | use constant { | ||
| 9 | |||
| 10 | # Short, established names -- supported indefinitely. | ||
| 11 | 2 | Geolocation => 1, | |
| 12 | DeviceScan => 2, | ||
| 13 | |||
| 14 | # TCF v2.3 spec-aligned long-form aliases (Phase 3). | ||
| 15 | UsePreciseGeolocationData => 1, | ||
| 16 | ActivelyScanDeviceCharacteristicsForIdentification => 2, | ||
| 17 | 2 | ▶ | }; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 18 | |||
| 19 | 2 | use constant SpecialFeatureDescription => { | |
| 20 | Geolocation => "Use precise geolocation data", | ||
| 21 | DeviceScan => "Actively scan device characteristics for identification" | ||
| 22 | 2 | ▶ | }; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 23 | |||
| 24 | 2 | our @EXPORT_OK = qw< | |
| 25 | Geolocation | ||
| 26 | DeviceScan | ||
| 27 | UsePreciseGeolocationData | ||
| 28 | ActivelyScanDeviceCharacteristicsForIdentification | ||
| 29 | SpecialFeatureDescription | ||
| 30 | >; | ||
| 31 | |||
| 32 | 2 | our %EXPORT_TAGS = (all => \@EXPORT_OK); | |
| 33 | |||
| 34 | 2 | 1; | |
| 35 | |||
| 36 | __END__ | ||
| 37 | |||
| 38 | =encoding utf8 | ||
| 39 | |||
| 40 | =head1 NAME | ||
| 41 | |||
| 42 | GDPR::IAB::TCFv2::Constants::SpecialFeature - TCF v2.3 special features | ||
| 43 | |||
| 44 | =head1 SYNOPSIS | ||
| 45 | |||
| 46 | use warnings; | ||
| 47 | |||
| 48 | use GDPR::IAB::TCFv2::Constants::SpecialFeature qw<:all>; | ||
| 49 | |||
| 50 | use feature 'say'; | ||
| 51 | |||
| 52 | say "Special feature id is ", Geolocation, ", and it means " , SpecialFeatureDescription->{Geolocation}; | ||
| 53 | # Output: | ||
| 54 | # Special feature id is 1, and it means Use precise geolocation data | ||
| 55 | |||
| 56 | =head1 CONSTANTS | ||
| 57 | |||
| 58 | All constants are integers. | ||
| 59 | |||
| 60 | To find the description of a given id you can use the hashref L</SpecialFeatureDescription>. | ||
| 61 | |||
| 62 | =head2 Geolocation | ||
| 63 | |||
| 64 | Special feature id 1: Use precise geolocation data | ||
| 65 | |||
| 66 | With your acceptance, your precise location (within a radius of less than 500 metres) may be used in support of the purposes explained in this notice. | ||
| 67 | |||
| 68 | =head2 DeviceScan | ||
| 69 | |||
| 70 | Special feature id 2: Actively scan device characteristics for identification | ||
| 71 | |||
| 72 | With your acceptance, certain characteristics specific to your device might be requested and used to distinguish it from other devices (such as the installed fonts or plugins, the resolution of your screen) in support of the purposes explained in this notice. | ||
| 73 | |||
| 74 | =head2 SpecialFeatureDescription | ||
| 75 | |||
| 76 | Returns a hashref with a mapping between all special feature ids and their description. | ||
| 77 | |||
| 78 | =head1 NAME ALIASES | ||
| 79 | |||
| 80 | Both special features are also exported under long-form aliases that mirror | ||
| 81 | the IAB Global Vendor List wording for TCF v2.3: | ||
| 82 | |||
| 83 | =over 4 | ||
| 84 | |||
| 85 | =item * | ||
| 86 | |||
| 87 | C<Geolocation> — C<UsePreciseGeolocationData> (id 1) | ||
| 88 | |||
| 89 | =item * | ||
| 90 | |||
| 91 | C<DeviceScan> — C<ActivelyScanDeviceCharacteristicsForIdentification> (id 2) | ||
| 92 | |||
| 93 | =back | ||
| 94 | |||
| 95 | Both names resolve to the same integer and are interchangeable. | ||