blib/lib/Catalyst/Helper/DBIC/DeploymentHandler.pm

filter: Statementstmt 65.0% 13 / 20 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod 0.0% 0 / 1 totaltotal 65.3% 17 / 26 CC 1 SCAR 1.8
CC
1
Cov
65%
mk_stuff
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
↑ Summary
1 #
2 # This file is part of Catalyst-Helper-DBIC-DeploymentHandler
3 #
4 # This software is Copyright (c) 2011 by Chris Weyl.
5 #
6 # This is free software, licensed under:
7 #
8 # The GNU Lesser General Public License, Version 2.1, February 1999
9 #
10 package Catalyst::Helper::DBIC::DeploymentHandler;
11 2 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
12 2 $Catalyst::Helper::DBIC::DeploymentHandler::AUTHORITY = 'cpan:RSRCHBOY';
13 }
14 {
15 2 $Catalyst::Helper::DBIC::DeploymentHandler::VERSION = '0.001';
16 }
17  
18 # ABSTRACT: Create a script/myapp_dbicdh.pl to help manage your DBIC deployments
19  
20 2 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
21 2 ▶use common::sense;
Subroutine BEGIN: called CC=1 SCAR=0.0
22  
23 2 ▶use File::Spec;
Subroutine BEGIN: called CC=1 SCAR=0.0
24  
25 0 ▶sub mk_stuff {
Subroutine mk_stuff: not called CC=1 SCAR=6.9
Pod undocumented
26 0 my ($self, $helper, $args) = @_;
27  
28 #my $app = lc $helper->{app};
29  
30 0 my $base = $helper->{base};
31 0 my $app = lc $helper->{app};
32  
33 0 $app =~ s/::/_/g;
34  
35 0 my $script = File::Spec->catfile($base, 'script', $app.'_dbicdh.pl');
36 0 $helper->render_file('dbicdh', $script);
37 0 chmod 0755, $script;
38 }
39  
40  
41 2 1;
42  
43  
44  
45  
46 =pod
47  
48 =head1 NAME
49  
50 Catalyst::Helper::DBIC::DeploymentHandler - Create a script/myapp_dbicdh.pl to help manage your DBIC deployments
51  
52 =head1 VERSION
53  
54 version 0.001
55  
56 =head1 SYNOPSIS
57  
58 ./script/myapp_create.pl DBIC::DeploymentHandler
59  
60 =head1 DESCRIPTION
61  
62 This is a Catalyst helper module that builds a
63 L<DBIx::Class::DeploymentHandler> script for you.
64  
65 VERY EARLY CODE: things may yet change, but shouldn't impact older versions
66 (unless you regenerate the script).
67  
68 =head1 TODO
69  
70 Schemas not named MyApp::DB::Schema.
71  
72 Determine the db type automatically
73  
74 =head1 SEE ALSO
75  
76 L<DBIx::Class::DeploymentHandler>, L<DBIx::Class>,
77 L<DBIx::Class::DeploymentHandler::Manual::CatalystIntro>
78  
79 =head1 CODE LINEAGE
80  
81 While I put together this helper module, this code is largely based on the
82 information (and code) in
83 L<DBIx::Class::DeploymentHandler::Manual::CatalystIntro>. Any errors are mine.
84  
85 =head1 AUTHOR
86  
87 Chris Weyl <cweyl@alumni.drew.edu>
88  
89 =head1 COPYRIGHT AND LICENSE
90  
91 This software is Copyright (c) 2011 by Chris Weyl.
92  
93 This is free software, licensed under:
94  
95 The GNU Lesser General Public License, Version 2.1, February 1999
96  
97 =cut
98  
99  
100 __DATA__
↑ Summary