App-DBCritic

 view release on metacpan or  search on metacpan

bin/dbcritic  view on Meta::CPAN

#!/usr/bin/env perl

package main;
use Modern::Perl '2011';    ## no critic (Modules::ProhibitUseQuotedVersion)
use utf8;

our $VERSION = '0.023';     # VERSION
use Getopt::Long::Descriptive;
use App::DBCritic;

my ( $opt, $usage ) = describe_options(
    '%c %o',
    [ 'dsn|d=s'           => 'DBI data source name' ],
    [ 'username|user|u:s' => 'name of user to use to connect to database' ],
    [ 'password|pass|p:s' => 'password for connecting to database' ],
    [   'class_name|class|c:s' =>
            'DBIx::Class::Schema to use rather than generating one',
    ],
    [ 'help|h' => 'print usage message and exit' ],
);

if ( $opt->help ) {
    print $usage->text;
    exit;
}

my $critic = App::DBCritic->new(
    map  { $_ => $opt->$_ }
    grep { defined $opt->$_ } qw(dsn username password class_name),
);
$critic->critique();

# PODNAME: dbcritic
# ABSTRACT: Critique a database schema for best practices

__END__

=pod

=encoding UTF-8

=for :stopwords Mark Gardner cpan testmatrix url annocpan anno bugtracker rt cpants
kwalitee diff irc mailto metadata placeholders metacpan

=head1 NAME

dbcritic - Critique a database schema for best practices

=head1 VERSION

version 0.023

=head1 USAGE

    dbcritic --help
    dbcritic --dsn dbi:Oracle:HR --username scott --password tiger
    dbcritic --class_name My::Schema --dsn dbi:mysql:database=db --username perl --password pass

=head1 DESCRIPTION

This is the command line interface to L<App::DBCritic|App::DBCritic>,
a utility for scanning a database schema for violations of best practices.

=head1 CONFIGURATION

All configuration is done via the command line options described by
C<dbcritic --help>.

=head1 SUPPORT

=head2 Perldoc

You can find documentation for this module with the perldoc command.

  perldoc dbcritic

=head2 Websites

The following websites have more information about this module, and may be of help to you. As always,
in addition to those websites please use your favorite search engine to discover more resources.

=over 4

=item *

Search CPAN

The default CPAN search engine, useful to view POD in HTML format.

L<http://search.cpan.org/dist/App-DBCritic>

=item *

CPAN Ratings

The CPAN Ratings is a website that allows community ratings and reviews of Perl modules.

L<http://cpanratings.perl.org/d/App-DBCritic>

=item *

CPANTS

The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution.

L<http://cpants.cpanauthors.org/dist/App-DBCritic>

=item *

CPAN Testers

The CPAN Testers is a network of smoke testers who run automated tests on uploaded CPAN distributions.

L<http://www.cpantesters.org/distro/A/App-DBCritic>

=item *



( run in 0.830 second using v1.01-cache-2.11-cpan-0bb4e1dffa6 )