.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" 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::Optional::Dependencies 3pm" .TH DBIx::Class::Optional::Dependencies 3pm "2022-05-21" "perl v5.34.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::Optional::Dependencies \- Optional module dependency specifications (for module authors) .SH "SYNOPSIS" .IX Header "SYNOPSIS" Somewhere in your build-file (e.g. Module::Install's Makefile.PL): .PP .Vb 1 \& ... \& \& configure_requires \*(AqDBIx::Class\*(Aq => \*(Aq0.082843\*(Aq; \& \& require DBIx::Class::Optional::Dependencies; \& \& my $deploy_deps = DBIx::Class::Optional::Dependencies\->req_list_for(\*(Aqdeploy\*(Aq); \& \& for (keys %$deploy_deps) { \& requires $_ => $deploy_deps\->{$_}; \& } \& \& ... .Ve .PP Note that there are some caveats regarding \f(CW\*(C`configure_requires()\*(C'\fR, more info can be found at \*(L"configure_requires\*(R" in Module::Install .SH "DESCRIPTION" .IX Header "DESCRIPTION" Some of the less-frequently used features of DBIx::Class have external module dependencies on their own. In order not to burden the average user with modules he will never use, these optional dependencies are not included in the base Makefile.PL. Instead an exception with a descriptive message is thrown when a specific feature is missing one or several modules required for its operation. This module is the central holding place for the current list of such dependencies, for DBIx::Class core authors, and DBIx::Class extension authors alike. .SH "CURRENT REQUIREMENT GROUPS" .IX Header "CURRENT REQUIREMENT GROUPS" Dependencies are organized in \f(CW\*(C`groups\*(C'\fR and each group can list one or more required modules, with an optional minimum version (or 0 for any version). The group name can be used in the .SS "DBIx::Class::Admin" .IX Subsection "DBIx::Class::Admin" Modules required for the DBIx::Class administrative library .IP "\(bu" 4 JSON::Any >= 1.23 .IP "\(bu" 4 Moose >= 0.98 .IP "\(bu" 4 MooseX::Types >= 0.21 .IP "\(bu" 4 MooseX::Types::JSON >= 0.02 .IP "\(bu" 4 MooseX::Types::LoadableClass >= 0.011 .IP "\(bu" 4 MooseX::Types::Path::Class >= 0.05 .PP Requirement group: \fBadmin\fR .SS "dbicadmin" .IX Subsection "dbicadmin" Modules required for the \s-1CLI\s0 DBIx::Class interface dbicadmin .IP "\(bu" 4 Getopt::Long::Descriptive >= 0.081 .IP "\(bu" 4 JSON::Any >= 1.23 .IP "\(bu" 4 Moose >= 0.98 .IP "\(bu" 4 MooseX::Types >= 0.21 .IP "\(bu" 4 MooseX::Types::JSON >= 0.02 .IP "\(bu" 4 MooseX::Types::LoadableClass >= 0.011 .IP "\(bu" 4 MooseX::Types::Path::Class >= 0.05 .IP "\(bu" 4 Text::CSV >= 1.16 .PP Requirement group: \fBadmin_script\fR .SS "\fBStorage::DBI::deploy()\fP" .IX Subsection "Storage::DBI::deploy()" Modules required for \*(L"deployment_statements\*(R" in DBIx::Class::Storage::DBI and \*(L"deploy\*(R" in DBIx::Class::Schema .IP "\(bu" 4 SQL::Translator >= 0.11018 .PP Requirement group: \fBdeploy\fR .SS "Sybase \s-1ASE\s0 support" .IX Subsection "Sybase ASE support" Modules required to connect to Sybase \s-1ASE\s0 .IP "\(bu" 4 DBD::Sybase .PP Requirement group: \fBrdbms_ase\fR .SS "\s-1DB2\s0 support" .IX Subsection "DB2 support" Modules required to connect to \s-1DB2\s0 .IP "\(bu" 4 \&\s-1DBD::DB2\s0 .PP Requirement group: \fBrdbms_db2\fR .SS "\s-1DB2\s0 on \s-1AS/400\s0 support" .IX Subsection "DB2 on AS/400 support" Modules required to connect to \s-1DB2\s0 on \s-1AS/400\s0 .IP "\(bu" 4 \&\s-1DBD::ODBC\s0 .PP Requirement group: \fBrdbms_db2_400\fR .SS "Firebird support" .IX Subsection "Firebird support" Modules required to connect to Firebird .IP "\(bu" 4 DBD::Firebird .PP Requirement group: \fBrdbms_firebird\fR .SS "Firebird support via DBD::InterBase" .IX Subsection "Firebird support via DBD::InterBase" Modules required to connect to Firebird via DBD::InterBase .IP "\(bu" 4 DBD::InterBase .PP Requirement group: \fBrdbms_firebird_interbase\fR .SS "Firebird support via \s-1DBD::ODBC\s0" .IX Subsection "Firebird support via DBD::ODBC" Modules required to connect to Firebird via \s-1DBD::ODBC\s0 .IP "\(bu" 4 \&\s-1DBD::ODBC\s0 .PP Requirement group: \fBrdbms_firebird_odbc\fR .SS "Informix support" .IX Subsection "Informix support" Modules required to connect to Informix .IP "\(bu" 4 DBD::Informix .PP Requirement group: \fBrdbms_informix\fR .SS "\s-1MS\s0 Access support via \s-1DBD::ADO\s0 (Windows only)" .IX Subsection "MS Access support via DBD::ADO (Windows only)" Modules required to connect to \s-1MS\s0 Access via \s-1DBD::ADO.\s0 This particular \s-1DBD\s0 is available on Windows only .IP "\(bu" 4 \&\s-1DBD::ADO\s0 .PP Requirement group: \fBrdbms_msaccess_ado\fR .SS "\s-1MS\s0 Access support via \s-1DBD::ODBC\s0" .IX Subsection "MS Access support via DBD::ODBC" Modules required to connect to \s-1MS\s0 Access via \s-1DBD::ODBC\s0 .IP "\(bu" 4 \&\s-1DBD::ODBC\s0 .PP Requirement group: \fBrdbms_msaccess_odbc\fR .SS "\s-1MSSQL\s0 support via \s-1DBD::ADO\s0 (Windows only)" .IX Subsection "MSSQL support via DBD::ADO (Windows only)" Modules required to connect to \s-1MSSQL\s0 via \s-1DBD::ADO.\s0 This particular \s-1DBD\s0 is available on Windows only .IP "\(bu" 4 \&\s-1DBD::ADO\s0 .PP Requirement group: \fBrdbms_mssql_ado\fR .SS "\s-1MSSQL\s0 support via \s-1DBD::ODBC\s0" .IX Subsection "MSSQL support via DBD::ODBC" Modules required to connect to \s-1MSSQL\s0 via \s-1DBD::ODBC\s0 .IP "\(bu" 4 \&\s-1DBD::ODBC\s0 .PP Requirement group: \fBrdbms_mssql_odbc\fR .SS "\s-1MSSQL\s0 support via DBD::Sybase" .IX Subsection "MSSQL support via DBD::Sybase" Modules required to connect to \s-1MSSQL\s0 via DBD::Sybase .IP "\(bu" 4 DBD::Sybase .PP Requirement group: \fBrdbms_mssql_sybase\fR .SS "MySQL support" .IX Subsection "MySQL support" Modules required to connect to MySQL .IP "\(bu" 4 DBD::mysql .PP Requirement group: \fBrdbms_mysql\fR .SS "Oracle support" .IX Subsection "Oracle support" Modules required to connect to Oracle .IP "\(bu" 4 DBD::Oracle .IP "\(bu" 4 Math::Base36 >= 0.07 .IP "\(bu" 4 Math::BigInt >= 1.80 .PP Requirement group: \fBrdbms_oracle\fR .SS "PostgreSQL support" .IX Subsection "PostgreSQL support" Modules required to connect to PostgreSQL .IP "\(bu" 4 DBD::Pg .PP Requirement group: \fBrdbms_pg\fR .SS "SQLAnywhere support" .IX Subsection "SQLAnywhere support" Modules required to connect to SQLAnywhere .IP "\(bu" 4 DBD::SQLAnywhere .PP Requirement group: \fBrdbms_sqlanywhere\fR .SS "SQLAnywhere support via \s-1DBD::ODBC\s0" .IX Subsection "SQLAnywhere support via DBD::ODBC" Modules required to connect to SQLAnywhere via \s-1DBD::ODBC\s0 .IP "\(bu" 4 \&\s-1DBD::ODBC\s0 .PP Requirement group: \fBrdbms_sqlanywhere_odbc\fR .SS "SQLite support" .IX Subsection "SQLite support" Modules required to connect to SQLite .IP "\(bu" 4 DBD::SQLite .PP Requirement group: \fBrdbms_sqlite\fR .SS "Storage::Replicated" .IX Subsection "Storage::Replicated" Modules required for DBIx::Class::Storage::DBI::Replicated .IP "\(bu" 4 Clone .IP "\(bu" 4 Moose >= 0.98 .IP "\(bu" 4 MooseX::Types >= 0.21 .IP "\(bu" 4 MooseX::Types::LoadableClass >= 0.011 .PP Requirement group: \fBreplicated\fR .SH "METHODS" .IX Header "METHODS" .SS "req_group_list" .IX Subsection "req_group_list" .IP "Arguments: none" 4 .IX Item "Arguments: none" .PD 0 .IP "Return Value: \e%list_of_requirement_groups" 4 .IX Item "Return Value: %list_of_requirement_groups" .PD .PP This method should be used by DBIx::Class packagers, to get a hashref of all dependencies keyed by dependency group. Each key (group name) can be supplied to one of the group-specific methods below. .SS "req_list_for" .IX Subsection "req_list_for" .ie n .IP "Arguments: $group_name" 4 .el .IP "Arguments: \f(CW$group_name\fR" 4 .IX Item "Arguments: $group_name" .PD 0 .IP "Return Value: \e%list_of_module_version_pairs" 4 .IX Item "Return Value: %list_of_module_version_pairs" .PD .PP This method should be used by DBIx::Class extension authors, to determine the version of modules a specific feature requires in the \fBcurrent\fR version of DBIx::Class. See the \*(L"\s-1SYNOPSIS\*(R"\s0 for a real-world example. .SS "req_ok_for" .IX Subsection "req_ok_for" .ie n .IP "Arguments: $group_name" 4 .el .IP "Arguments: \f(CW$group_name\fR" 4 .IX Item "Arguments: $group_name" .PD 0 .IP "Return Value: 1|0" 4 .IX Item "Return Value: 1|0" .PD .PP Returns true or false depending on whether all modules required by \&\f(CW$group_name\fR are present on the system and loadable. .SS "req_missing_for" .IX Subsection "req_missing_for" .ie n .IP "Arguments: $group_name" 4 .el .IP "Arguments: \f(CW$group_name\fR" 4 .IX Item "Arguments: $group_name" .PD 0 .ie n .IP "Return Value: $error_message_string" 4 .el .IP "Return Value: \f(CW$error_message_string\fR" 4 .IX Item "Return Value: $error_message_string" .PD .PP Returns a single line string suitable for inclusion in larger error messages. This method would normally be used by DBIx::Class core-module author, to indicate to the user that he needs to install specific modules before he will be able to use a specific feature. .PP For example if some of the requirements for \f(CW\*(C`deploy\*(C'\fR are not available, the returned string could look like: .PP .Vb 1 \& SQL::Translator >= 0.11018 (see DBIx::Class::Optional::Dependencies for details) .Ve .PP The author is expected to prepend the necessary text to this message before returning the actual error seen by the user. .SS "die_unless_req_ok_for" .IX Subsection "die_unless_req_ok_for" .ie n .IP "Arguments: $group_name" 4 .el .IP "Arguments: \f(CW$group_name\fR" 4 .IX Item "Arguments: $group_name" .PP Checks if \*(L"req_ok_for\*(R" passes for the supplied \f(CW$group_name\fR, and in case of failure throws an exception including the information from \*(L"req_missing_for\*(R". .SS "req_errorlist_for" .IX Subsection "req_errorlist_for" .ie n .IP "Arguments: $group_name" 4 .el .IP "Arguments: \f(CW$group_name\fR" 4 .IX Item "Arguments: $group_name" .PD 0 .IP "Return Value: \e%list_of_loaderrors_per_module" 4 .IX Item "Return Value: %list_of_loaderrors_per_module" .PD .PP Returns a hashref containing the actual errors that occurred while attempting to load each module in the requirement group. .SH "FURTHER QUESTIONS?" .IX Header "FURTHER QUESTIONS?" Check the list of additional \s-1DBIC\s0 resources. .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This module is free software copyright by the DBIx::Class (\s-1DBIC\s0) authors. You can redistribute it and/or modify it under the same terms as the DBIx::Class library.