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.036000';
3             # ABSTRACT: force C<quote_names> on
4              
5 56     56   26039 use strict;
  56         130  
  56         1608  
6 56     56   305 use warnings;
  56         117  
  56         1406  
7              
8 56     56   292 use parent 'DBIx::Class::Schema';
  56         108  
  56         277  
9              
10 56     56   3298 use DBIx::Class::Helpers::Util 'normalize_connect_info';
  56         114  
  56         574  
11              
12             sub connection {
13 60     60 1 20448 my $self = shift;
14              
15 60         354 my $args = normalize_connect_info(@_);
16 60         213 $args->{quote_names} = 1;
17              
18 60         277 $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