Cataly...:Visit(3pm)

πŸ“¦
version 0.10 Β· 4 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– Cataly...:Visit(3pm) β€” the manual page, but make it make sense πŸ’–

okay bestie, so this is Cataly...:Visit(3pm) from the User Contributed Perl Documentation corner of the world, and we're gonna get you fluent in it. grab a boba, we're doing this. πŸ§‹βœ¨


✨ NAME ✨

Catalyst::View::Component::SubInclude::Visit β€” it's the visit() plugin for C::V::Component::SubInclude. that's the whole name, no notes, periodt. πŸ‘‘


🌸 VERSION 🌸

Version 0.07_03. yes it's a dev release, yes it's serving, don't @ me. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

first, in your view class:

package MyApp::View::TT;
use Moose;

extends 'Catalyst::View::TT';
with 'Catalyst::View::Component::SubInclude';

__PACKAGE__->config( subinclude_plugin => 'Visit' );

then, literally somewhere in your templates:

[% subinclude('/my/widget') %]

that's it. that's the whole vibe. 🌈


πŸ’œ DESCRIPTION πŸ’œ

Catalyst::View::Component::SubInclude::Visit uses $c->visit() to render subinclude contents. it's giving "delegation but cute". 🫢

⚠️ heads up bestie: this method is only supported when you're running Catalyst version 5.71000 or newer. older Catalyst? no cap, it will not work. πŸ’€
⚠️ WARNING: as of Catalyst version 5.71000, this plugin doesn't work for chained actions with captured arguments. apparently visit doesn't handle this type of actions yet. so if your chained action has captures, this plugin is NOT the moment. it's giving broken. 😭

πŸ‘‘ METHODS πŸ‘‘

generate_subinclude( $c, $path, @args )

this is (roughly) equivalent to the following call:

$c->visit( $path, @args );

but β€” and this is the iconic part β€” it handles all the nasty little details for you, like localizing the stash, the parameters, and the response body. this is necessary to keep behavior consistent with the other plugins. it's the responsible friend of the group chat. 🧚


πŸ”₯ SEE ALSO πŸ”₯

  • Catalyst::View::Component::SubInclude
  • Catalyst

go read those too, iykyk. ⭐


πŸŽ€ AUTHOR πŸŽ€

Nilson Santos Figueiredo Junior, <nilsonsfj at cpan.org> β€” the legend who wrote this. πŸ‘‘


πŸ’– SPONSORSHIP πŸ’–

Development sponsored by Ionzero LLC <http://www.ionzero.com/>. thank you for funding the vibes, fr fr. 🫢


Copyright (C) 2009 Nilson Santos Figueiredo Junior.

Copyright (C) 2009 Ionzero LLC.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


and that's the whole page bestie!! this one's perl v5.34.0, dated 2022-06-09, and it lives under Cataly...:Visit(3pm). slay, you're now fluent. now go render some subincludes. πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from