Encodi...in::XS(3pm)

πŸ“¦
version 1.02 Β· 5 versions
, in debian trixie, ubuntu resolute

πŸ’– Encoding::FixLatin::XS πŸ’–

okay bestie, gather round, because this is the XS implementation layer for Encoding::FixLatin and it is, lowkey, the speed-up arc of your life. It lives in the Encodi...in::XS(3pm) corner of the User Contributed Perl Documentation universe, and honestly? It's giving "understudy who actually ate". ✨


πŸŽ€ NAME πŸŽ€

Encoding::FixLatin::XS β€” the XS implementation layer for Encoding::FixLatin. that's it, that's the whole name, no notes πŸ’…


🌸 SYNOPSIS 🌸

bestie you literally do not call this thing directly. you just do the normal thing and it sneaks in like a supportive friend:

use Encoding::FixLatin  qw(fix_latin);    # will load XS module if available

my $utf8_string = fix_latin($mixed_encoding_string);

see how there's no XS anywhere? yeah. that's the whole vibe. πŸ¦‹


✨ DESCRIPTION ✨

so here's the tea: this module is a C implementation of the fix_latin algorithm. That means it's fast. That means it slays. πŸ’…

BUT β€” and this is important, bestie β€” it is not meant to be called directly. Don't come for it. Just install this module and use Encoding::FixLatin like a normal person. Encoding::FixLatin will clock this module if it's around and use it, and if it's not around it'll gracefully fall back to the pure-Perl implementation like the resilient queen it is. 🫢

the fix_latin function takes a use_xs option, and that option is your little remote control for how all this XS-ness goes down:

# Default behaviour: try to load/use XS module, fall back to PP on failure

$out = fix_latin($in, use_xs => 'auto');

# Always try to load/use XS module, die if it's not available

$out = fix_latin($in, use_xs => 'always');

# Never try to load/use XS module, always use pure-Perl implementation

$out = fix_latin($in, use_xs => 'never');

so like:

  • 'auto' β€” the default behaviour, the chill one. It tries to load and use the XS module, and if that fails it just falls back to PP. no drama, no cap. ✨
  • 'always' β€” ride or die mode. Always tries to load and use the XS module, and if it's not available it dies. no fallback, no plan B, main character energy only. 😭
  • 'never' β€” the "I said what I said" option. Never tries to load or use the XS module, always uses the pure-Perl implementation. periodt. πŸ’œ

πŸ”₯ SEE ALSO πŸ”₯

  • Encoding::FixLatin β€” the actual star of the show, go read that one too bestie πŸŽ€

🫢 SUPPORT 🫢

you can find the documentation for this module with the perldoc command, iconic behaviour honestly:

perldoc Encoding::FixLatin::XS

and you can also go looking for info at these fine establishments:

go forth and file things, bestie, the maintainers love that 🌈


Copyright (C) 2014 by Grant McLean "<grantm@cpan.org>" πŸ’–

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. slay.


so yeah. install it, forget it exists, let Encoding::FixLatin handle the vibes. that's the whole assignment. πŸ’…βœ¨

this little page is from perl v5.40.1, dated 2025-04-15, and it's the Encodi...in::XS(3pm) manual β€” mwah, no notes, bye bestie πŸŽ€πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from