File Coverage

lib/DBIx/Schema/Changelog/Action/Sql.pm
Criterion Covered Total %
statement 20 20 100.0
branch n/a
condition n/a
subroutine 8 8 100.0
pod 3 3 100.0
total 31 31 100.0


line stmt bran cond sub pod time code
1             package DBIx::Schema::Changelog::Action::Sql;
2              
3             =head1 NAME
4              
5             DBIx::Schema::Changelog::Action::Sql - Action for manually called sql
6              
7             =head1 VERSION
8              
9             Version 0.8.0
10              
11             =cut
12              
13             our $VERSION = '0.8.0';
14              
15 6     6   1816 use utf8;
  6         24  
  6         82  
16 6     6   295 use strict;
  6         18  
  6         305  
17 6     6   38 use warnings;
  6         13  
  6         301  
18 6     6   791 use Moose;
  6         455061  
  6         57  
19              
20             with 'DBIx::Schema::Changelog::Action';
21              
22             =head1 SUBROUTINES/METHODS
23              
24             =over 4
25              
26             =item add
27              
28             Execute sql statements can lead very likely to incompatibilities.
29              
30             =cut
31              
32             sub add {
33 1     1 1 2 my ( $self, $params ) = @_;
34 1         310 print STDERR __PACKAGE__, ' (', __LINE__,'). WARNING: Execute sql statements can lead very likely to incompatibilities.', $/;
35 1         10 $self->_do( $params->{as} );
36             }
37              
38             =item alter
39              
40             Not needed!
41              
42             =cut
43              
44 1     1 1 539 sub alter { }
45              
46             =item drop
47              
48             Not needed!
49              
50             =cut
51              
52 1     1 1 2 sub drop { }
53              
54 6     6   50735 no Moose;
  6         25  
  6         48  
55             __PACKAGE__->meta->make_immutable;
56              
57             1;
58              
59             __END__
60              
61             =back
62              
63             =head1 AUTHOR
64              
65             Mario Zieschang, C<< <mario.zieschang at combase.de> >>
66              
67             =head1 LICENSE AND COPYRIGHT
68              
69             Copyright 2015 Mario Zieschang.
70              
71             This program is free software; you can redistribute it and/or modify it
72             under the terms of the the Artistic License (2.0). You may obtain a
73             copy of the full license at:
74              
75             L<http://www.perlfoundation.org/artistic_license_2_0>
76              
77             Any use, modification, and distribution of the Standard or Modified
78             Versions is governed by this Artistic License. By using, modifying or
79             distributing the Package, you accept this license. Do not use, modify,
80             or distribute the Package, if you do not accept this license.
81              
82             If your Modified Version has been derived from a Modified Version made
83             by someone other than you, you are nevertheless required to ensure that
84             your Modified Version complies with the requirements of this license.
85              
86             This license does not grant you the right to use any trademark, service
87             mark, trade name, or logo of the Copyright Holder.
88              
89             This license includes the non-exclusive, worldwide, free-of-charge
90             patent license to make, have made, use, offer to sell, sell, import and
91             otherwise transfer the Package with respect to any patent claims
92             licensable by the Copyright Holder that are necessarily infringed by the
93             Package. If you institute patent litigation (including a cross-claim or
94             counterclaim) against any party alleging that the Package constitutes
95             direct or contributory patent infringement, then this Artistic License
96             to you shall terminate on the date that such litigation is filed.
97              
98             Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER
99             AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
100             THE IMPLIED WARRANTIES OF MERCHANT ABILITY, FITNESS FOR A PARTICULAR
101             PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY
102             YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR
103             CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR
104             CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE,
105             EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
106              
107             =cut