Badger...c::URI(3pm)

πŸ“¦
version 0.16 Β· 4 versions
, in debian trixie, ubuntu noble, ubuntu resolute

πŸ’– Badger::Codec::URI πŸ’–

okay bestie, so this is Badger::Codec::URI β€” a lil' Perl module from the User Contributed Perl Documentation collection, and it's literally just here to do URI encode/decode for you. no cap. πŸ¦‹


✨ NAME ✨

Badger::Codec::URI β€” URI encode/decode, that's the whole vibe πŸŽ€


🌸 SYNOPSIS 🌸

use Badger::Codec::URI;
my $codec   = Badger::Codec::URI->new();
my $encoded = $codec->encode("Hello World!");
my $decoded = $codec->decode($encoded);

like... four lines and you're already slaying, periodt πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

This module implements a subclass of Badger::Codec for URI encoding and decoding. that's it, that's the whole personality. it's giving "small but essential," fr fr ✨


πŸ’œ FUNCTIONS πŸ’œ

🌈 encode_uri($data)

This function URI-encodes the $data passed as an argument. hand it some data, get back the encoded glow-up πŸ’–

🌈 decode_uri($data)

This function URI-decodes the $data passed as an argument. encoded data goes in, decoded data comes out, iconic behaviour honestly πŸ‘‘


πŸŽ€ METHODS πŸŽ€

🌸 encode($data)

This method URI-encodes the data referenced by the first argument. It delegates to the encode_uri() function.

$encoded = Badger::Codec::URI->encode($data);

it's not doing the work itself bestie, it's just handing it off to encode_uri() β€” delegating is self-care 🫢

🌸 decode($data)

This method decodes the encoded data passed as the first argument. It delegates to the decode_uri() function.

$decoded = Badger::Codec::URI->decode($encoded);

same energy as above, just the reverse direction. decode era πŸ”₯

🌸 encoder()

This method returns a reference to the encode_uri() function. yes, just the reference. very "here's the number, text them yourself" πŸ“±

🌸 decoder()

This method returns a reference to the decode_uri() function. matching set, we love a duo πŸ’«


πŸ‘‘ AUTHOR πŸ‘‘

Andy Wardley <http://wardley.org/> β€” the icon, the legend, the main character who wrote this πŸ’œ


Copyright (C) 2008-2009 Andy Wardley. All rights reserved. no stealing, bestie, that's the law πŸ™ˆ


🌈 SEE ALSO 🌈

  • Badger::Codecs
  • Badger::Codec

go read those next, iykyk πŸ“š


πŸ’€ quick reminder bestie: this page ships with perl v5.36.0, dated 2023-08-28. stay hydrated, encode responsibly, and go off βœ¨πŸ’…πŸŽ€
πŸ“¦ where this page comes from