line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Schedule::LongSteps::Storage::AutoDBIx::Schema; |
2
|
|
|
|
|
|
|
$Schedule::LongSteps::Storage::AutoDBIx::Schema::VERSION = '0.021'; |
3
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
31
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
34
|
|
5
|
1
|
|
|
1
|
|
5
|
use base qw/DBIx::Class::Schema/; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
414
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
__PACKAGE__->load_classes({ 'Schedule::LongSteps::Storage::AutoDBIx::Schema::Result' => [ 'LongstepProcess' ] }); |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub connection{ |
10
|
|
|
|
|
|
|
my ($class, @args ) = @_; |
11
|
|
|
|
|
|
|
unless( ( ref $args[0] || '' ) eq 'CODE' ){ |
12
|
|
|
|
|
|
|
defined( $args[3] ) or ( $args[3] = {} ); |
13
|
|
|
|
|
|
|
$args[3]->{AutoCommit} = 1; |
14
|
|
|
|
|
|
|
$args[3]->{RaiseError} = 1; |
15
|
|
|
|
|
|
|
$args[3]->{mysql_enable_utf8} = 1; |
16
|
|
|
|
|
|
|
## Only for mysql DSNs |
17
|
|
|
|
|
|
|
$args[3]->{on_connect_do} = ["SET SESSION sql_mode = 'TRADITIONAL'"]; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
my $self = $class->next::method(@args); |
20
|
|
|
|
|
|
|
return $self; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
1; |
23
|
|
|
|
|
|
|
__END__ |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 NAME |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
Schedule::LongSteps::Storage::AutoDBIx::Schema - A built-in DBIx::Class Schema for the AutoDBIx storage |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head2 connection |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
See superclass L<DBIx::Class::Schema> |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=cut |