File Coverage

blib/lib/DBIx/Class/Smooth/Result.pm
Criterion Covered Total %
statement 27 31 87.1
branch n/a
condition 0 3 0.0
subroutine 8 11 72.7
pod 0 5 0.0
total 35 50 70.0


line stmt bran cond sub pod time code
1 2     2   10793 use 5.20.0;
  2         8  
2 2     2   14 use strict;
  2         4  
  2         49  
3 2     2   12 use warnings;
  2         13  
  2         140  
4              
5             package DBIx::Class::Smooth::Result;
6              
7             # ABSTRACT: Short intro
8             our $AUTHORITY = 'cpan:CSSON'; # AUTHORITY
9             our $VERSION = '0.0101';
10              
11 2     2   47 use parent 'DBIx::Class::Candy';
  2         6  
  2         12  
12 2     2   29194 use String::CamelCase;
  2         1148  
  2         102  
13              
14 2     2   15 use experimental qw/signatures/;
  2         4  
  2         13  
15              
16             sub base {
17 0     0 0 0 (my $base = caller(2)) =~ s{::Schema::Result::.*$}{};
18              
19 0   0     0 return $_[1] || "${base}::Schema::Result";
20             }
21 8     8 0 6489 sub autotable { 1 }
22 0     0 0 0 sub perl_version { 20 }
23 0     0 0 0 sub experimental { [ ] }
24              
25 8     8 0 47 sub gen_table($self, $resultclass, $version) {
  8         15  
  8         15  
  8         14  
  8         11  
26 8         59 $resultclass =~ s{^.*::Schema::Result::}{};
27 8         22 $resultclass =~ s{::}{__}g;
28 8         25 $resultclass = String::CamelCase::decamelize($resultclass);
29              
30 8         274 return $resultclass;
31             }
32              
33             1;
34              
35             __END__
36              
37             =pod
38              
39             =encoding UTF-8
40              
41             =head1 NAME
42              
43             DBIx::Class::Smooth::Result - Short intro
44              
45             =head1 VERSION
46              
47             Version 0.0101, released 2018-11-29.
48              
49             =head1 SOURCE
50              
51             L<https://github.com/Csson/p5-DBIx-Class-Smooth>
52              
53             =head1 HOMEPAGE
54              
55             L<https://metacpan.org/release/DBIx-Class-Smooth>
56              
57             =head1 AUTHOR
58              
59             Erik Carlsson <info@code301.com>
60              
61             =head1 COPYRIGHT AND LICENSE
62              
63             This software is copyright (c) 2018 by Erik Carlsson.
64              
65             This is free software; you can redistribute it and/or modify it under
66             the same terms as the Perl 5 programming language system itself.
67              
68             =cut