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.034002';
3             # ABSTRACT: force C<quote_names> on
4              
5 55     55   21300 use strict;
  55         113  
  55         1368  
6 55     55   247 use warnings;
  55         106  
  55         1233  
7              
8 55     55   239 use parent 'DBIx::Class::Schema';
  55         97  
  55         242  
9              
10 55     55   3097 use DBIx::Class::Helpers::Util 'normalize_connect_info';
  55         122  
  55         480  
11              
12             sub connection {
13 59     59 1 18049 my $self = shift;
14              
15 59         326 my $args = normalize_connect_info(@_);
16 59         226 $args->{quote_names} = 1;
17              
18 59         218 $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) 2019 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