… | |
… | |
446 | &{ $my_filter{$_[0]} or return } |
446 | &{ $my_filter{$_[0]} or return } |
447 | }); |
447 | }); |
448 | |
448 | |
449 | |
449 | |
450 | Example: use the safe filter function (see L<SECURITY CONSIDERATIONS> for |
450 | Example: use the safe filter function (see L<SECURITY CONSIDERATIONS> for |
451 | more considerations on security). |
451 | more considerations regarding security). |
452 | |
452 | |
453 | CBOR::XS->new->filter (\&CBOR::XS::safe_filter)->decode ($cbor_data); |
453 | CBOR::XS->new->filter (\&CBOR::XS::safe_filter)->decode ($cbor_data); |
454 | |
454 | |
455 | =item $cbor_data = $cbor->encode ($perl_scalar) |
455 | =item $cbor_data = $cbor->encode ($perl_scalar) |
456 | |
456 | |