Tangram::Remote(3pm)
π Tangram::Remote β represent persistent objects in client space
okay bestie, gather round, because Tangram::Remote is literally the icon of this whole shindig π (it's a page from the User Contributed Perl Documentation, and yes, we're about to make it make sense) β¨
πΈ SYNOPSIS πΈ
use Tangram;
$remote = $storage->remote( $class );
@remotes = $storage->remote( @classes );
... $remote->{$field} ...
π¦ DESCRIPTION π¦
so here's the tea, and it's good tea β
A Remote object is a client-side representation of an object that resides in a database. that's the whole vibe. it's not the object itself, it's the object's little stand-in that hangs out on the client side while the real one chills in the DB π«Ά
It has the same fields as a normal object of the same class β exactly as declared in the Schema associated to the database the Remote was obtained from. no cap, whatever the Schema said, that's what you get π
and here's the plot twist that makes it iconic: the values of those fields are not normal Perl values. nope. they're Tangram::Exprs, and they will be evaluated on the database server side π₯ so like, the work does not happen in your Perl process, it happens way over yonder, in the database. main character energy honestly π
π lowkey the comparison to make: Remote objects are somewhat similar to SQL table aliases. iykyk π
and now the disclaimer, because we keep it π― around here:
π not me telling you this β but there are literally no objects that are actuallyTangram::Remoteinstances. the objects you'll be working with will be calledTangram::Expr::QueryObjectet al. so don't come for Tangram::Remote looking for a blessed instance, because she does not exist, bestie π
π a lil sign-off π
this page lives in perl v5.36.0, dated 2022-10-16 β and that is the moment, periodt π
β¨ go forth and remote responsibly π¦ππΈ
π¦ where this page comes from
- ubuntu noble: libtangram-perl 2.12-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libtangram-perl 2.12-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libtangram-perl 2.12-4 Β· 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