Name
App::Sqitch::Engine - Sqitch Deployment Engine
Synopsis
my $engine = App::Sqitch::Engine->new( sqitch => $sqitch );
Description
App::Sqitch::Engine provides the base class for all Sqitch storage engines.
Interface
Class Methods
config_vars
my %vars = App::Sqitch::Engine->config_vars;
Returns a hash of names and types to use for configuration variables for the engine. These can be set under the core.$engine_name
section in any configuration file.
The keys in the returned hash are the names of the variables. The values are the data types. Valid data types include:
Values ending in +
(a plus sign) may be specified multiple times. Example:
(
client => 'any',
db_name => 'any',
host => 'any',
port => 'int',
set => 'any+',
)
In this example, the port
variable will be stored and retrieved as an integer. The set
variable may be of any type and may be included multiple times. All the other variables may be of any type.
By default, App::Sqitch::Engine returns an empty list. Subclasses for supported engines will return more.
Constructors
load
my $cmd = App::Sqitch::Engine->load(%params);
A factory method for instantiating Sqitch engines. It loads the subclass for the specified engine and calls new
, passing the Sqitch object. Supported parameters are:
sqitch
-
The App::Sqitch object driving the whole thing.
new
my $engine = App::Sqitch::Engine->new(%params);
Instantiates and returns a App::Sqitch::Engine object.
Instance Methods
name
my $name = $engine->name;
The name of the engine. Defaults to the last part of the package name, so as a rule you should not need to override it, since it is that string that Sqitch uses to find the engine class.
See Also
- sqitch
-
The Sqitch command-line client.
Author
David E. Wheeler <david@justatheory.com>
License
Copyright (c) 2012 iovation Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.