GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  CATALYST::TRAITFOR::MODEL::DBIC::SCHEMA::PERREQUESTSCHEMA (3)

.ds Aq ’

NAME

Catalyst::TraitFor::Model::DBIC::Schema::PerRequestSchema - Clone the schema with attributes for each requests

CONTENTS

SYNOPSIS



    __PACKAGE__->config({
        traits => [PerRequestSchema],
    });

    sub per_request_schema_attributes {
        my ($self, $c) = @_;
        return (restricting_object => $c->user->obj);
    }
    ### OR ###
    sub per_request_schema {
        my ($self, $c) = @_;
        return $self->schema->schema_method($c->user->obj)
    }



DESCRIPTION

Clones the schema for each new request with the attributes retrieved from your per_request_schema_attributes method, which you must implement. This method is passed the context.

Alternatively, you could also override the per_request_schema method if you need access to the schema clone and/or need to separate out the Model/Schema methods. (See examples above and the defaults in the code.)

SEE ALSO

Catalyst::Model::DBIC::Schema, DBIx::Class::Schema

AUTHOR

See AUTHOR in Catalyst::Model::DBIC::Schema and CONTRIBUTORS in Catalyst::Model::DBIC::Schema.

COPYRIGHT

See COPYRIGHT in Catalyst::Model::DBIC::Schema.

LICENSE

This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 CATALYST::TRAITFOR::MODEL::DBIC::SCHEMA::PERREQUESTSCHEMA (3) 2012-08-14

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.