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
DBIx::Class::Schema::PopulateMore::Visitor(3) User Contributed Perl Documentation DBIx::Class::Schema::PopulateMore::Visitor(3)

DBIx::Class::Schema::PopulateMore::Visitor - Visitor for the Populate Data

    ##Example Usage

See Tests for more example usage.

When populating a table, sometimes we need to inflate values that we won't know of in advance. For example we might have a column that is FK to another column in another table. We want to make it easy to 'tag' a value as something other than a real value to be inserted into the table.

Right now we only have one substitution to do, which is the FK one mentioned above, but we might eventually create other substitution types so we've broken this out to make it neat and easy to do so.

This class defines the following attributes.

The coderef to be execute should the match condition succeed

How we know the value is really something to inflate or perform a substitution on. This get's the namespace of the substitution plugin and it's other data.

The default behavior (where there is no substitution namespace, is to do the inflate to resultset. This is the most common usecase.

Used to collect up ref addresses of arrays/hashes we have already seen

This module defines the following methods.

Given a coderef, sets the current callback and returns self so that we can chain

A simple visitor that only expects to perform replacements on values

Here is where we make the choice as to if this value needs to be inflated via a plugin

We break this out to handle the ugliness surrounding dealing with undef values and also to make it easier on subclassers.

Please see DBIx::Class::Schema::PopulateMore For authorship information

visit method culled from code in Data::Visitor::Lite which is copyright 2011 Daichi Hiroki <hirokidaichi {at} gmail.com>

Please see DBIx::Class::Schema::PopulateMore For licensing terms.
2014-10-09 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

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