MCP::S...ession(3pm)

πŸ“¦ version 0.10, in ubuntu stonking

πŸ’– MCP::Server::Session β€” the session container, bestie edition

okay so this is MCP::Server::Session, from the User Contributed Perl Documentation collection, and it's literally just a little container that holds all your per-session state. no drama, no cap. it's giving ✨organized✨.


✨ SYNOPSIS ✨

use MCP::Server::Session;

my $session = MCP::Server::Session->new(id => '12345');
$session->touch;

see that? make one, give it an id, poke it with touch. that's the whole vibe. πŸŽ€


🌸 DESCRIPTION 🌸

MCP::Server::Session is a container for per-session state. that's it. that's the tea. it holds the stuff that belongs to one session and one session only, and it does not overcomplicate. main character behavior, honestly. πŸ‘‘


πŸ¦‹ ATTRIBUTES πŸ¦‹

MCP::Server::Session implements the following attributes. lowkey the whole personality is in here:

  • id
my $id   = $session->id;
$session = $session->id('12345');

the session identifier. like, the name tag. the who-dis. 🏷️

  • last_used
my $time = $session->last_used;
$session = $session->last_used(time);

epoch seconds of the last activity on this session, and it defaults to the time the session was created. updated by "touch". so basically it's the "girl when were you last online" timestamp, and yes it keeps track fr fr. ⏰

  • stream
my $stream = $session->stream;
$session   = $session->stream(Mojolicious::Controller->new);

the Mojolicious::Controller that's currently serving the server-to-client SSE stream for this session β€” or undef if no stream is open. so when nobody's streaming, it's just... undef. empty. alone. πŸ’€ but when it's live? iconic. 🌈


πŸ’… METHODS πŸ’…

MCP::Server::Session inherits all methods from Mojo::Base and implements the following new ones.

  • touch
$session = $session->touch;

set "last_used" to the current time. that's the whole method. it touches the session. that's it. obsessed with the simplicity honestly. 🫢


πŸ‘€ SEE ALSO πŸ‘€

go read those, bestie, they're the whole lore. 🌐


and that's a wrap! πŸ’– this page came to you via perl v5.40.1, dated 2026-05-09, filed under MCP::S...ession(3pm). periodt. βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from