Protoc...t::URL(3pm)

🌸 NAME 🌸

okay bestie, this is Protocol::WebSocket::URL(3pm) β€” WebSocket URL πŸ’… it's giving URL-handling main character energy, and yes, that's the whole name vibe.

✨ SYNOPSIS ✨

# Construct
my $url = Protocol::WebSocket::URL->new;
$url->host('example.com');
$url->port('3000');
$url->secure(1);
$url->to_string; # wss://example.com:3000

# Parse
my $url = Protocol::WebSocket::URL->new->parse('wss://example.com:3000');
$url->host;   # example.com
$url->port;   # 3000
$url->secure; # 1

πŸ’– DESCRIPTION πŸ’–

Construct or parse a WebSocket URL. That's the whole assignment, and it ate. πŸ”₯

πŸŽ€ ATTRIBUTES πŸŽ€

the attribute lineup is literally:

  • host
  • port
  • resource_name
  • secure

πŸ¦‹ METHODS πŸ¦‹

new

Create a new Protocol::WebSocket::URL instance. fresh instance, fresh vibe ✨

parse

Parse a WebSocket URL. yep, that's the move 🫢

to_string

Construct a WebSocket URL. iconic behavior, no cap πŸ‘‘


mwah πŸ’– that's the page, bestie β€” perl v5.42.0, dated 2019-03-13, and it's Protocol::WebSocket::URL(3pm) signing off πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from