Net::T...nection(3pm)
π Net::Trac::Connection β the group chat with your Trac server π
Net::Trac::Connection lives in the User Contributed Perl Documentation section of your friendly neighborhood manual, and it's a 3pm page, meaning it's a Perl module. Bestie, this is the page that tells you how to slide into your Trac server's DMs. π¦
β¨ NAME β¨
Net::Trac::Connection β Connection to a remote Trac server. It's giving "the one who talks to Trac so you don't have to." π
πΈ DESCRIPTION πΈ
Okay so listen. This class represents a connection to a remote Trac instance. That's it, that's the whole vibe. It is required by all other classes which need to talk to Trac β so like, every other class in this little friend group is depending on this one to carry the conversation. No pressure, queen. π
β SYNOPSIS β
Here's the moment you've been waiting for, the main character entrance:
use Net::Trac::Connection;
my $trac = Net::Trac::Connection->new(
url => 'http://trac.example.com',
user => 'snoopy',
password => 'doghouse'
);
Look at that. snoopy and doghouse, iconic behavior honestly. πΆ
π ACCESSORS π
These are the read-only girlies. Look, don't touch. π
urlβ The url of the Trac instance used by this connection. Read-only after initialization, so once it's set, it's set. Periodt. π
user
password
Yep. Those two. Just sitting there being accessors, exactly like the original says and not a single syllable more. π
π ACCESSORS / MUTATORS π
These ones you can change. Living their best flexible lives. π
logged_in [BOOLEAN]β Gets/sets a boolean indicating whether or not the connection is logged in yet. So like, are we in or are we not in? This flag knows. πͺβ¨mech [MECH]β Gets/sets theNet::Trac::Mechanize(or subclassed) object for this connection to use. Unless you want to replace it with one of your own, the default will suffice. Ngl the default is lowkey doing great, but if you've got a custom mech you're obsessed with, go off. π€π
π₯ METHODS π₯
new PARAMHASH
Creates a new Net::Trac::Connection given a paramhash with values for the keys "url", "user", and "password". That's the birth certificate right there. Welcome to the world, little connection. πΌπ¦
ensure_logged_in
Ensures this connection is logged in. Returns true on success, and undef on failure. Also sets the "logged_in" flag, so everyone knows what happened. Fr fr, it's the responsible one. β
π PRIVATE METHODS π
These are the private ones, okay? Like, the notes app drafts. You can peek, but they're not for you. π«£
_fetch URL
Fetches the provided relative URL from the Trac server. Returns undef on an error (after warning, because it's not gonna suffer in silence) and the content ("$self-"mech->content>) on success. π
_warn_on_error URL
Checks the last request for an error condition and warns about them if found. Returns with a TRUE value if errors occurred and a FALSE value otherwise, for nicer conditionals. It's giving considerate. π
_tsv_to_struct PARAMHASH
Takes a paramhash of the keys "data". Given TSV data this method will return a reference to an array. Glow up: tabs in, arrayref out. β¨π
π LICENSE π
Copyright 2008-2009 Best Practical Solutions.
This package is licensed under the same terms as Perl 5.8.8. π
And that's the whole page, bestie! This one came from perl v5.36.0, dated 2022-12-12, under the header Net::T...nection(3pm). Stay logged in, stay slay. πβ¨ππ¦
π¦ where this page comes from
- debian bookworm: libnet-trac-perl 0.16-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libnet-trac-perl 0.16-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libnet-trac-perl 0.16-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libnet-trac-perl 0.16-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libnet-trac-perl 0.16-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms