File Coverage

blib/lib/DBIx/Class/Helper/Schema/QuoteNames.pm
Criterion Covered Total %
statement 16 16 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod 1 1 100.0
total 22 22 100.0


line stmt bran cond sub pod time code
1             package DBIx::Class::Helper::Schema::QuoteNames;
2             $DBIx::Class::Helper::Schema::QuoteNames::VERSION = '2.035000';
3             # ABSTRACT: force C<quote_names> on
4              
5 56     56   28903 use strict;
  56         143  
  56         1733  
6 56     56   312 use warnings;
  56         123  
  56         1547  
7              
8 56     56   291 use parent 'DBIx::Class::Schema';
  56         133  
  56         319  
9              
10 56     56   3744 use DBIx::Class::Helpers::Util 'normalize_connect_info';
  56         154  
  56         609  
11              
12             sub connection {
13 60     60 1 22176 my $self = shift;
14              
15 60         416 my $args = normalize_connect_info(@_);
16 60         226 $args->{quote_names} = 1;
17              
18 60         270 $self->next::method($args)
19             }
20              
21             1;
22              
23             __END__
24              
25             =pod
26              
27             =head1 NAME
28              
29             DBIx::Class::Helper::Schema::QuoteNames - force C<quote_names> on
30              
31             =head1 SYNOPSIS
32              
33             package MyApp::Schema;
34              
35             __PACKAGE__->load_components('Helper::Schema::QuoteNames');
36              
37             =head1 DESCRIPTION
38              
39             This helper merely forces C<quote_names> on, no matter how your settings are
40             configured. You should use it.
41              
42             =head1 AUTHOR
43              
44             Arthur Axel "fREW" Schmidt <frioux+cpan@gmail.com>
45              
46             =head1 COPYRIGHT AND LICENSE
47              
48             This software is copyright (c) 2020 by Arthur Axel "fREW" Schmidt.
49              
50             This is free software; you can redistribute it and/or modify it under
51             the same terms as the Perl 5 programming language system itself.
52              
53             =cut