Cataly...direct(3pm)

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

πŸ’– Cataly...direct(3pm) β€” the girlies' guide πŸ’–

okay so bestie, this is a page from the User Contributed Perl Documentation, and it's filed under the manual name Cataly...direct(3pm). yes the title got squished by the terminal, that's just how man pages do. the real one is Catalyst::Plugin::Redirect. let's go πŸŽ€


✨ NAME ✨

Catalyst::Plugin::Redirect β€” redirecting for Catalyst, made easy, offered to you on a lil platter πŸ’…

🌸 SYNOPSIS 🌸

use Catalyst 'Redirect';

$c->get_baseurl;

$c->redirect('redirect_url');
$c->redirect('/redirect_url');
$c->redirect('http://www.perl.org/');

πŸ¦‹ DESCRIPTION πŸ¦‹

Redirect for Catalyst, used easily, is offered. that's the whole vibe fr fr ✨

πŸ‘‘ METHODS πŸ‘‘

πŸ’œ get_baseurl

Your app's basic URL gets returned, periodt. so if your application is being run at http://myhost/myapp/, it hands you back /myapp/ 🫢

πŸ“ redirect

Three whole moods, bestie:

  • $c->redirect('redirect_url'); β†’ this means $c->res->redirect('redirect_url') is executed. straightforward, iconic, no notes πŸ’…
  • $c->redirect('/redirect_url'); β†’ this means $c->res->redirect($c->get_baseurl.'redirect_url') is executed. notice the leading slash? it gets the base url glued onto it ✨
  • $c->redirect('http://www.perl.org/'); β†’ this means $c->res->redirect('http://www.perl.org/') is executed. full URL, full send, no base url involved 🌈

πŸ’€ BUGS πŸ’€

When a Reverse Proxy is in the mix, get_baseurl returns the backend server's base. like, for example, / will be returned when http://www.mydomain.com/myapp/ is a proxy for http://appserver.local.server/. so yeah, that's a whole thing, be aware 😭

πŸ”₯ SEE ALSO πŸ”₯

  • Catalyst

πŸ’– AUTHOR πŸ’–

Shota Takayama, "shot[atmark]bindstorm.jp" β€” thank you for your service, king 🫑✨

This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself. slay, open source legend 🌸


and that's the whole page, bestie! this was perl v5.32.0, dated 2021-01-08, and it came to you straight from the Cataly...direct(3pm) man page in the User Contributed Perl Documentation. no cap, that's a wrap πŸ’…πŸ’–

πŸ“¦ where this page comes from