.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "DBIx::Class::Schema::PopulateMore::Command 3pm" .TH DBIx::Class::Schema::PopulateMore::Command 3pm "2023-01-22" "perl v5.36.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" DBIx::Class::Schema::PopulateMore::Command \- Command Class to Populate a Schema .SH "DESCRIPTION" .IX Header "DESCRIPTION" This is a command pattern class to manage the job of populating a DBIx::Class::Schema with information. We break this out because the actual job is a bit complex, is likely to grow more complex, and so that we can more easily identify refactorable and reusable parts. .SH "ATTRIBUTES" .IX Header "ATTRIBUTES" This class defines the following attributes. .SS "schema" .IX Subsection "schema" This is the Schema we are populating .SS "exception_cb" .IX Subsection "exception_cb" contains a callback to the exception method supplied by \s-1DBIC\s0 .SS "definitions" .IX Subsection "definitions" This is an arrayref of information used to populate tables in the database .SS "match_condition" .IX Subsection "match_condition" 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. .SS "visitor" .IX Subsection "visitor" We define a visitor so that we can perform the value inflations and or substitutions. This is still a little work in progress, but it's getting neater .SS "rs_index" .IX Subsection "rs_index" The index of previously inflated resultsets. Basically when we create a new row in the table, we cache the result object so that it can be used as a dependency in creating another. .PP Eventually will be moved into the constructor for a plugin .SS "set_rs_index" .IX Subsection "set_rs_index" Set an index value to an inflated result .SS "get_rs_index" .IX Subsection "get_rs_index" given an index, returns the related inflated resultset .SS "inflator_loader" .IX Subsection "inflator_loader" Loads each of the available inflators, provider access to the objects .SS "inflator_dispatcher" .IX Subsection "inflator_dispatcher" Holds an object that can perform dispatching to the inflators. .SH "METHODS" .IX Header "METHODS" This module defines the following methods. .SS "_build_visitor" .IX Subsection "_build_visitor" lazy build for the \*(L"visitor\*(R" attribute. .SS "_build_inflator_loader" .IX Subsection "_build_inflator_loader" lazy build for the \*(L"inflator_loader\*(R" attribute .SS "_build_inflator_dispatcher" .IX Subsection "_build_inflator_dispatcher" lazy build for the \*(L"inflator_dispatcher\*(R" attribute .SS "execute" .IX Subsection "execute" The command classes main method. Returns a Hash of the created result rows, where each key is the named index and the value is the row object. .SS "dispatch_inflator" .IX Subsection "dispatch_inflator" Dispatch to the correct inflator .SS "create_fixture({})" .IX Subsection "create_fixture({})" Given a hash suitable for a DBIx::Class::Resultset create method, attempt to update or create a row in the named source. .PP returns the newly created row or throws an exception if there is a failure .SS "merge_fields_values" .IX Subsection "merge_fields_values" Given a fields and values, combine to a hash suitable for using in a create_fixture row statement. .SS "field_value" .IX Subsection "field_value" Correctly create an array from the fields, values variables, skipping those where the value is undefined. .SS "coerce_to_array" .IX Subsection "coerce_to_array" given a value that is either an arrayref or a scalar, put it into array context and return that array. .SH "AUTHOR" .IX Header "AUTHOR" Please see DBIx::Class::Schema::PopulateMore For authorship information .SH "LICENSE" .IX Header "LICENSE" Please see DBIx::Class::Schema::PopulateMore For licensing terms.