| 1 | package iabtcfv2 0.512; | ||
| 2 | |||
| 3 | 2 | ▶ | use v5.12; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 2 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 2 | ▶ | use GDPR::IAB::TCFv2::Parser; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 2 | ▶ | use GDPR::IAB::TCFv2::Validator; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | 2 | ▶ | use Exporter qw(import); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | |||
| 11 | 2 | our @EXPORT = qw(tcf validator); | |
| 12 | |||
| 13 | 4 | ▶ | sub tcf { GDPR::IAB::TCFv2::Parser->Parse(@_) } |
|
Subroutine
tcf: called CC=1 SCAR=0.0
Pod
documented
| |||
| 14 | 1 | ▶ | sub validator { GDPR::IAB::TCFv2::Validator->new(@_) } |
|
Subroutine
validator: called CC=1 SCAR=0.0
Pod
documented
| |||
| 15 | |||
| 16 | 2 | 1; | |
| 17 | __END__ | ||
| 18 | |||
| 19 | =pod | ||
| 20 | |||
| 21 | =encoding utf8 | ||
| 22 | |||
| 23 | =head1 NAME | ||
| 24 | |||
| 25 | iabtcfv2 - Pure-exporter short alias for one-liner and shell use | ||
| 26 | |||
| 27 | =head1 SYNOPSIS | ||
| 28 | |||
| 29 | use iabtcfv2; | ||
| 30 | my $tc_string = 'CLc...'; | ||
| 31 | my $c = tcf($tc_string); | ||
| 32 | my $v = validator(vendor_id => 284); | ||
| 33 | |||
| 34 | # From the shell: | ||
| 35 | # perl -Miabtcfv2 -E 'say tcf(shift)->cmp_id' "CLc..." | ||
| 36 | |||
| 37 | =head1 DESCRIPTION | ||
| 38 | |||
| 39 | This module is a thin wrapper around L<GDPR::IAB::TCFv2::Parser> and | ||
| 40 | L<GDPR::IAB::TCFv2::Validator>. It exports two functions by default to | ||
| 41 | reduce boilerplate in one-liners and short scripts. | ||
| 42 | |||
| 43 | =head1 FUNCTIONS | ||
| 44 | |||
| 45 | =head2 tcf($tc_string, %opts) | ||
| 46 | |||
| 47 | Alias for L<GDPR::IAB::TCFv2::Parser-E<gt>Parse>. Returns a | ||
| 48 | L<GDPR::IAB::TCFv2::Parser> object. | ||
| 49 | |||
| 50 | =head2 validator(%opts) | ||
| 51 | |||
| 52 | Alias for L<GDPR::IAB::TCFv2::Validator-E<gt>new>. Returns a | ||
| 53 | L<GDPR::IAB::TCFv2::Validator> object. | ||
| 54 | |||
| 55 | =head1 SEE ALSO | ||
| 56 | |||
| 57 | L<GDPR::IAB::TCFv2> | ||
| 58 | |||
| 59 | =cut | ||