Index | index by Group | index by Distribution | index by Vendor | index by creation date | index by Name | Mirrors | Help | Search |
Name: perl-Catalyst-Component-ACCEPT_CONTEXT | Distribution: Mageia |
Version: 0.70.0 | Vendor: Mageia.Org |
Release: 7.mga9 | Build date: Tue Mar 29 02:35:17 2022 |
Group: Development/Perl | Build host: localhost |
Size: 13907 | Source RPM: perl-Catalyst-Component-ACCEPT_CONTEXT-0.70.0-7.mga9.src.rpm |
Packager: umeabot <umeabot> | |
Url: https://metacpan.org/release/Catalyst-Component-ACCEPT_CONTEXT | |
Summary: Make the current Catalyst context available in Models and Views |
Models and Views don't usually have access to the request object, since they probably don't really need it. Sometimes, however, having the request context available outside of Controllers makes your application cleaner. If that's the case, just use this module as a base class: package MyApp::Model::Foobar; use base qw|Catalyst::Component::ACCEPT_CONTEXT Catalyst::Model|; Then, you'll be able to get the current request object from within your model: sub do_something { my $self = shift; print "The current URL is ". $self->context->req->uri->as_string; }
GPL+ or Artistic
* Tue Mar 29 2022 umeabot <umeabot> 0.70.0-7.mga9 + Revision: 1831396 - Mageia 9 Mass Rebuild
/usr/share/doc/perl-Catalyst-Component-ACCEPT_CONTEXT /usr/share/doc/perl-Catalyst-Component-ACCEPT_CONTEXT/Changes /usr/share/doc/perl-Catalyst-Component-ACCEPT_CONTEXT/META.yml /usr/share/doc/perl-Catalyst-Component-ACCEPT_CONTEXT/README /usr/share/man/man3/Catalyst::Component::ACCEPT_CONTEXT.3pm.xz /usr/share/perl5/vendor_perl/Catalyst /usr/share/perl5/vendor_perl/Catalyst/Component /usr/share/perl5/vendor_perl/Catalyst/Component/ACCEPT_CONTEXT.pm
Generated by rpm2html 1.8.1
Fabrice Bellet, Sun Dec 1 04:18:02 2024