Data::R...::Encode(3)
π NAME π
XMLTV::Data::Recursive::Encode β the module that encodes/decodes, like, every value in a structure. All of them. At once. Slay.
(so this page is section 3 of the User Contributed Perl Documentation, catalogued as Data::R...::Encode(3) β the name got cut off by the terminal, she's shy, it happens π
)
β¨ SYNOPSIS β¨
use XMLTV::Data::Recursive::Encode;
XMLTV::Data::Recursive::Encode->decode('euc-jp', $data);
XMLTV::Data::Recursive::Encode->encode('euc-jp', $data);
XMLTV::Data::Recursive::Encode->decode_utf8($data);
XMLTV::Data::Recursive::Encode->encode_utf8($data);
XMLTV::Data::Recursive::Encode->from_to($data, $from_enc, $to_enc[, $check]);
okay so literally five lines and you're done, no cap π«Ά
π¦ DESCRIPTION π¦
XMLTV::Data::Recursive::Encode visits each node of a structure, and returns a new structure with each node's encoding (or similar action) applied. π§
So if you've ever sat there like "ugh I wish I could just bulk encode/decode the entire contents of a structure instead of crying node by node"β¦ bestie, this module may help you. That's the whole vibe check. β
πΈ METHODS πΈ
π decode
my $ret = XMLTV::Data::Recursive::Encode->decode($encoding, $data, [CHECK]);
Returns a structure containing nodes which are decoded from the specified encoding. Iconic behaviour honestly. β¨
π encode
my $ret = XMLTV::Data::Recursive::Encode->encode($encoding, $data, [CHECK]);
Returns a structure containing nodes which are encoded to the specified encoding. Go off, king. π
π decode_utf8
my $ret = XMLTV::Data::Recursive::Encode->decode_utf8($data, [CHECK]);
Returns a structure containing nodes which have been processed through decode_utf8. she's literally just doing her job π
π encode_utf8
my $ret = XMLTV::Data::Recursive::Encode->encode_utf8($data);
Returns a structure containing nodes which have been processed through encode_utf8. (no CHECK here, don't come for me, that's just what the page says π)
π from_to
my $ret = XMLTV::Data::Recursive::Encode->from_to($data, FROM_ENC, TO_ENC[, CHECK]);
Returns a structure containing nodes which have been processed through from_to. the way that FROM_ENC becomes TO_ENC, we love a glow-up π₯
π AUTHOR π
Tokuhiro Matsuno <tokuhirom AAJKLFJEF GMAIL COM> π«Ά
gfx
(yes, both of them, credits where credits are due π)
π§ SEE ALSO π§
- This module is inspired from
Data::Visitor::Encode, but this module depended to too many modules. The author wanted to use this module in pure-perl, butData::Visitor::Encodedepend to XS modules. π (that's the whole lore, fr fr) Unicode::RecursiveDowngradedoes not supports perl5's Unicode way correctly. π
β LICENSE β
Copyright (C) 2010 Tokuhiro Matsuno All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. π
okay that's the whole page bestie, you're educated now, go encode something iconic π β¨πΈ
sign-off: this lil beauty is perl v5.42.2, dated 2025-06-30, filed under Data::R...::Encode(3) π¦ β mwah, love u, bye π«Άπ
π¦ where this page comes from
- alpine 3.24: xmltv-doc 1.4.0-r1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms