Catalyst::Component::InstancePerContext man page on Fedora

Man page or keyword search:  
man Server   31170 pages
apropos Keyword Search (all sections)
Output format
Fedora logo
[printable version]

Catalyst::Component::IUsernContributCatalyst::Component::InstancePerContext(3)

NAME
       Catalyst::Component::InstancePerContext - Return a new instance a
       component on each request

SYNOPSYS
	   package MyComponent;
	   use Moose;
	   with 'Catalyst::Component::InstancePerContext';

	   sub build_per_context_instance{
	       my ($self, $c) = @_;
	       # ... do your thing here
	       return SomeModule->new(%args);
	   }

REQUIRED METHODS
       Your consuming class must implement the following method.

   build_per_context_instance
       The value returned by this call is what you will recieve when you call
       $c->component('YourComponent').

PROVIDED METHODS
       This role will add the following method to your consuming class.

   ACCEPT_CONTEXT
       If the context is not blessed, it will simple pass through the value of
       "build_per_context_instance". If context is blessed it will look in the
       "stash" for an instance of the requested component and return that or,
       if the value is not found, the value returned by
       "build_per_context_instance" will be stored and return.

       The idea behind this behavior is that a component can be built on a
       per-request basis, as the name of this module implies.

SEE ALSO
       Moose, Moose::Role, Catalyst::Component

AUTHOR
       Guillermo Roditi (groditi) <groditi@cpan.org>

LICENSE
       You may distribute this code under the same terms as Perl itself.

perl v5.14.1			  20Catalyst::Component::InstancePerContext(3)
[top]

List of man pages available for Fedora

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net