| 1 | package Schedule::LongSteps::Storage::AutoDBIx::Schema; | ||
| 2 | $Schedule::LongSteps::Storage::AutoDBIx::Schema::VERSION = '0.023'; | ||
| 3 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 1 | ▶ | use base qw/DBIx::Class::Schema/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 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__ | ||