DBIx/Class/Migration/Sandbox.pm

filter: Statementstmt 100% 7 / 7 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 1 / 1 Podpod n/a totaltotal 100% 8 / 8 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
CRAP 1.0
« DBIx/Class/Migration/RunScript/Trait/SchemaLoader.pm ↑ Summary
1 package DBIx::Class::Migration::Sandbox;
2  
3 7 ▶use Moose::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 7 has target_dir => (is=>'ro', required=>1);
6 7 has schema_class => (is=>'ro', required=>1);
7  
8 7 requires 'make_sandbox';
9  
10 7 1;
11  
12 =head1 NAME
13  
14 DBIx::Class::Migration::Sandbox - DB Sandbox Role
15  
16 =head1 SYNOPSIS
17  
18 package MyApp::Schema::Sandbox;
19  
20 use Moose;
21 with 'DBIx::Class::Migration::Sandbox';
22  
23 sub make_sandbox {
24 my ($self) = @_;
25  
26 ## Custom Processing to establish a running database
27  
28 return $dsn, $user, $password;
29 }
30  
31 __PACKAGE__->meta->make_immutable;
32  
33  
34 =head1 DESCRIPTION
35  
36 L<DBIx::Class::Migration> lets you easily create user level sandboxes of
37 your databases, which are suitable for prototyping and development. It comes
38 with support for creating MySQL, Sqlite and Postgresql sandboxes. However you
39 might have custom sandboxing needs. In which you can create a class that does
40 this role.
41  
42 The one required method C<make_sandbox>, should return something we can pass
43 to L<DBIx::Class::Schema/connect>.
44  
45 =head1 SEE ALSO
46  
47 L<DBIx::Class::Migration>, L<DBIx::Class::Migration::SqliteSandbox>,
48 L<DBIx::Class::Migration::MySQLSandbox>,
49 L<DBIx::Class::Migration::PostgresqlSandbox>
50  
51 =head1 AUTHOR
52  
53 See L<DBIx::Class::Migration> for author information
54  
55 =head1 COPYRIGHT & LICENSE
56  
57 See L<DBIx::Class::Migration> for copyright and license information
58  
59 =cut
60  
61  
« DBIx/Class/Migration/RunScript/Trait/SchemaLoader.pm ↑ Summary