Protoc...esponse(3pm)

πŸͺ NAME πŸͺ

Okay bestie, meet Protocol::WebSocket::Cookie::Response β€” literally the WebSocket Cookie Response module. This page lives under the manual name Protoc...esponse(3pm) in the User Contributed Perl Documentation, and it's giving exactly what the name says: construct or parse that response cookie vibe. 🫢✨


✨ SYNOPSIS ✨

Here's the whole mood, copied with love and zero edits:

# Constructor
my $cookie = Protocol::WebSocket::Cookie::Response->new(
    name    => 'foo',
    value   => 'bar',
    discard => 1,
    max_age => 0
);
$cookie->to_string; # foo=bar; Discard; Max-Age=0; Version=1

# Parser
my $cookie = Protocol::WebSocket::Cookie::Response->new;
$cookie->parse('foo=bar; Discard; Max-Age=0; Version=1');

Constructor on top, parser right below β€” the range, honestly. πŸŽ€


πŸ’– DESCRIPTION πŸ’–

Construct or parse a WebSocket response cookie.

That's the sentence, bestie β€” short, iconic, no cap. πŸ˜ŒπŸ“


πŸ› οΈ METHODS πŸ› οΈ

Two methods, both main-character energy:

🌟 parse

parse parses a WebSocket response cookie. Yes, the method name ate. Drop your cookie string in there and let it do its thing. πŸ’…

🌟 to_string

to_string constructs a WebSocket response cookie. It's the builder bestie β€” construct that WebSocket response cookie and slay. πŸ”₯


Before you go: this page's source/version is perl v5.42.0, dated 2019-03-13, and the manual name is Protoc...esponse(3pm). Bye bestie, go slay those cookies πŸ’–πŸŒˆ

πŸ“¦ where this page comes from