UR::Ob...t::Xsl(3pm)

πŸ“¦
version 0.470 Β· 2 versions
, in debian bookworm, ubuntu jammy, ubuntu noble

✨ UR::Ob...t::Xsl πŸ’…

okay so bestie, this is the manual page for UR::Ob...t::Xsl(3pm) β€” the Perl docs page (that's the 3pm part, iykyk) for a class whose full name is UR::Object::View::Default::Xsl. she's a base class πŸŽ€ β€” the mom friend of view classes, the one that does the XSL thing on an XML view to make content pop out the other side. no cap. ✨


🌸 NAME 🌸

UR::Object::View::Default::Xsl β€” the base class for views which use XSL on an XML view to generate content. periodt. πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

here's the whole vibe, verbatim, don't touch the code bestie:

#####

class Acme::Product::View::OrderStatus::Html {
  is => 'UR::Object::View::Default::Xsl',
}

#####

Acme/Product/View/OrderStatus/Html.pm.xsl

#####

$o = Acme::Product->get(1234);

$v = $o->create_view(
    perspective => 'order status',
    toolkit => 'html',
    aspects => [
      'id',
      'name',
      'qty_on_hand',
      'outstanding_orders' => [
        'id',
        'status',
        'customer' => [
          'id',
          'name',
        ]
      ],
    ],
);

$xml1 = $v->content;

$o->qty_on_hand(200);

$xml2 = $v->content;

so real talk, that's the whole flow: you declare a view class with is => 'UR::Object::View::Default::Xsl', you drop a matching .pm.xsl file next to it, you grab an object with Acme::Product->get(1234), you spin up a view with create_view passing a perspective, a toolkit of 'html', and your aspects (yes, nested, look at those outstanding_orders and customer layers β€” she's got range πŸ’…), then you pull $v->content into $xml1, mutate the object with $o->qty_on_hand(200), and pull $v->content again into $xml2. two snapshots, one glow-up. πŸ”₯


🫢 DESCRIPTION 🫢

This class implements basic HTML views of objects. πŸ“„βœ¨

She's also got standard behavior for all text views β€” so if you've met one of her siblings, you already know the vibe check. standard behavior, all text views, no surprises. 😌


πŸ’œ SEE ALSO πŸ’œ

go say hi to the rest of the family, they're all iconic in their own way:

  • UR::Object::View::Default::Text
  • UR::Object::View
  • UR::Object::View::Toolkit::XML
  • UR::Object::View::Toolkit::Text
  • UR::Object

and that's the page bestie!! πŸŽ€ this little love letter was brought to you by perl v5.32.1 and it was last touched on 2022-01-17 β€” yeah she's been serving since then and she's still cute. mwah. πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from