Catalyst-Helper-DBIC-DeploymentHandler
view release on metacpan or search on metacpan
lib/Catalyst/Helper/DBIC/DeploymentHandler.pm view on Meta::CPAN
#
# This file is part of Catalyst-Helper-DBIC-DeploymentHandler
#
# This software is Copyright (c) 2011 by Chris Weyl.
#
# This is free software, licensed under:
#
# The GNU Lesser General Public License, Version 2.1, February 1999
#
package Catalyst::Helper::DBIC::DeploymentHandler;
BEGIN {
$Catalyst::Helper::DBIC::DeploymentHandler::AUTHORITY = 'cpan:RSRCHBOY';
}
{
$Catalyst::Helper::DBIC::DeploymentHandler::VERSION = '0.001';
}
# ABSTRACT: Create a script/myapp_dbicdh.pl to help manage your DBIC deployments
use namespace::autoclean;
use common::sense;
use File::Spec;
sub mk_stuff {
my ($self, $helper, $args) = @_;
#my $app = lc $helper->{app};
my $base = $helper->{base};
my $app = lc $helper->{app};
$app =~ s/::/_/g;
my $script = File::Spec->catfile($base, 'script', $app.'_dbicdh.pl');
$helper->render_file('dbicdh', $script);
chmod 0755, $script;
}
1;
=pod
=head1 NAME
Catalyst::Helper::DBIC::DeploymentHandler - Create a script/myapp_dbicdh.pl to help manage your DBIC deployments
=head1 VERSION
version 0.001
=head1 SYNOPSIS
./script/myapp_create.pl DBIC::DeploymentHandler
=head1 DESCRIPTION
This is a Catalyst helper module that builds a
L<DBIx::Class::DeploymentHandler> script for you.
VERY EARLY CODE: things may yet change, but shouldn't impact older versions
(unless you regenerate the script).
=head1 TODO
Schemas not named MyApp::DB::Schema.
Determine the db type automatically
=head1 SEE ALSO
L<DBIx::Class::DeploymentHandler>, L<DBIx::Class>,
L<DBIx::Class::DeploymentHandler::Manual::CatalystIntro>
=head1 CODE LINEAGE
While I put together this helper module, this code is largely based on the
information (and code) in
L<DBIx::Class::DeploymentHandler::Manual::CatalystIntro>. Any errors are mine.
=head1 AUTHOR
Chris Weyl <cweyl@alumni.drew.edu>
=head1 COPYRIGHT AND LICENSE
This software is Copyright (c) 2011 by Chris Weyl.
This is free software, licensed under:
The GNU Lesser General Public License, Version 2.1, February 1999
=cut
( run in 1.405 second using v1.01-cache-2.11-cpan-0d23b851a93 )