[libcatalyst-modules-perl] 01/01: replace bundled Catalyst-Model-DBI with a dependency on libcatalyst-model-dbi-perl
Damyan Ivanov
dmn at moszumanska.debian.org
Wed May 14 10:02:06 UTC 2014
This is an automated email from the git hooks/post-receive script.
dmn pushed a commit to branch master
in repository libcatalyst-modules-perl.
commit 9b430ba66b44dcfeed97b80498cdc18bd3c82942
Author: Damyan Ivanov <dmn at debian.org>
Date: Wed May 14 10:01:58 2014 +0000
replace bundled Catalyst-Model-DBI with a dependency on libcatalyst-model-dbi-perl
---
bundle/02/Catalyst-Model-DBI | 1 -
debian/control | 1 +
debian/copyright | 5 -
sources/Catalyst-Model-DBI/Changes | 49 -----
sources/Catalyst-Model-DBI/MANIFEST | 11 --
sources/Catalyst-Model-DBI/META.json | 44 -----
sources/Catalyst-Model-DBI/META.yml | 25 ---
sources/Catalyst-Model-DBI/Makefile.PL | 13 --
sources/Catalyst-Model-DBI/README | 94 ----------
.../lib/Catalyst/Helper/Model/DBI.pm | 102 -----------
.../Catalyst-Model-DBI/lib/Catalyst/Model/DBI.pm | 198 ---------------------
sources/Catalyst-Model-DBI/t/01use.t | 5 -
sources/Catalyst-Model-DBI/t/02pod.t | 7 -
sources/Catalyst-Model-DBI/t/03podcoverage.t | 7 -
14 files changed, 1 insertion(+), 561 deletions(-)
diff --git a/bundle/02/Catalyst-Model-DBI b/bundle/02/Catalyst-Model-DBI
deleted file mode 120000
index 901b1b5..0000000
--- a/bundle/02/Catalyst-Model-DBI
+++ /dev/null
@@ -1 +0,0 @@
-../../sources/Catalyst-Model-DBI
\ No newline at end of file
diff --git a/debian/control b/debian/control
index 2f5095e..956c3d8 100644
--- a/debian/control
+++ b/debian/control
@@ -104,6 +104,7 @@ Depends: ${misc:Depends},
libcatalyst-perl (>= 5.90015),
libcatalyst-action-renderview-perl,
libcatalyst-component-instancepercontext-perl,
+ libcatalyst-model-dbi-perl,
libcatalyst-plugin-cache-perl,
libcatalyst-plugin-configloader-perl,
libcatalyst-plugin-session-perl,
diff --git a/debian/copyright b/debian/copyright
index 5aa2c52..37ec8d4 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -17,11 +17,6 @@ Copyright: 2005-2009, Christian Hansen <ch at ngmedia.com>
X-Upstream-Maintainers: Tomas Doran <bobtfish at bobtfish.net>
License: Artistic or GPL-1+
-Files: sources/Catalyst-Model-DBI
-Copyright: 2005-2012, Alex Pavlovic <alex.pavlovic at taskforce-1.com>
-X-Upstream-Maintainers: Alex Pavlovic <alex.pavlovic at taskforce-1.com>
-License: Artistic or GPL-1+
-
Files: sources/Catalyst-Model-DBIC-Schema
Copyright: 2006-2010, Brandon L Black <blblack at gmail.com>
2006-2010, Rafael Kitover <rkitover at cpan.org>
diff --git a/sources/Catalyst-Model-DBI/Changes b/sources/Catalyst-Model-DBI/Changes
deleted file mode 100644
index 7f437a1..0000000
--- a/sources/Catalyst-Model-DBI/Changes
+++ /dev/null
@@ -1,49 +0,0 @@
-Revision history for Perl extension Catalyst::Model::DBI.
-0.32 Fri May 03 23:23:00 2013
- - make use of basic log level
-0.31 Fri May 03 23:08:00 2013
- - added support for log levels
-0.30 Fri Apr 27 18:00:00 2012
- - rewrote internals to use DBIx::Connector and updated documentation
-0.29 Fri Mar 30 14:00:00 2012
- - added support for settings being loaded from config file
-0.28 Thu Jan 28 15:30:00 2010
- - Corrected PREREQ_PM
-0.27 Thu Jan 28 15:00:00 2010
- - Reverted to MRO::Compat
-0.26 Thu Jan 28 14:00:00 2010
- - Corrected PREREQ_PM
-0.25 Thu Jan 21 18:00:00 2010
- - Added support for Class::C3
-0.24 Sun Oct 18 19:30:00 2009
- - Fixup copyright info
-0.23 Fri Oct 02 10:30:00 2009
- - Corrected Changes file
-0.22 Fri Oct 02 10:00:00 2009
- - Change from NEXT to MRO::Compat
-0.21 Fri Oct 02 10:00:00 2009
- - Added support for configs named either "user" or "username" and "password" or "pass"
- - Updated the helper to use parent instead of base
-0.20 Sun Dec 07 17:36:00 2008
- - fixed issue: http://rt.cpan.org/Public/Bug/Display.html?id=38121
- - fixed issue: http://rt.cpan.org/Public/Bug/Display.html?id=39884
-0.19 Fri Sep 07 18:00:00 2007
- - cleaned up a few things
-0.18 Mon May 07 18:40:00 2007
- - reverting back to 0.15 as per Evan Caroll request, model behaving as expected
-0.17 Mon May 07 08:00:00 2007
- - made $self->_pid($$) "non lazy", fixed a few things
-0.16 Sun May 06 14:48:00 2007
- - added fix to support ACCEPT_CONTEXT as per issue brought up by Evan Caroll
-0.15 Sun Dec 10 23:00:00 2006
- - added fix to support config
-0.14 Sat Jun 24 18:00:00 2006
- - added additional check for stay_connected
-0.13 Tue May 30 22:00:00 2006
- - inherits from Catalyst::Model rather then Catalyst::Base
-0.12 Tue May 30 12:00:00 2006
- - made code mod_perl safe
-0.11 Sun Nov 27 18:00:00 2005
- - fixed a TT comment in helper class
-0.10 Sun Nov 27 15:00:00 2005
- - first release
diff --git a/sources/Catalyst-Model-DBI/MANIFEST b/sources/Catalyst-Model-DBI/MANIFEST
deleted file mode 100644
index d08e114..0000000
--- a/sources/Catalyst-Model-DBI/MANIFEST
+++ /dev/null
@@ -1,11 +0,0 @@
-Changes
-lib/Catalyst/Helper/Model/DBI.pm
-lib/Catalyst/Model/DBI.pm
-Makefile.PL
-MANIFEST This list of files
-README
-t/01use.t
-t/02pod.t
-t/03podcoverage.t
-META.yml Module meta-data (added by MakeMaker)
-META.json Module JSON meta-data (added by MakeMaker)
diff --git a/sources/Catalyst-Model-DBI/META.json b/sources/Catalyst-Model-DBI/META.json
deleted file mode 100644
index 0f9b7c9..0000000
--- a/sources/Catalyst-Model-DBI/META.json
+++ /dev/null
@@ -1,44 +0,0 @@
-{
- "abstract" : "unknown",
- "author" : [
- "Alex Pavlovic (alex.pavlovic at taskforce-1.com)"
- ],
- "dynamic_config" : 1,
- "generated_by" : "ExtUtils::MakeMaker version 6.66, CPAN::Meta::Converter version 2.130880",
- "license" : [
- "unknown"
- ],
- "meta-spec" : {
- "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
- "version" : "2"
- },
- "name" : "Catalyst-Model-DBI",
- "no_index" : {
- "directory" : [
- "t",
- "inc"
- ]
- },
- "prereqs" : {
- "build" : {
- "requires" : {
- "ExtUtils::MakeMaker" : "0"
- }
- },
- "configure" : {
- "requires" : {
- "ExtUtils::MakeMaker" : "0"
- }
- },
- "runtime" : {
- "requires" : {
- "Catalyst" : "5.00",
- "DBI" : "0",
- "DBIx::Connector" : "0",
- "MRO::Compat" : "0"
- }
- }
- },
- "release_status" : "stable",
- "version" : "0.32"
-}
diff --git a/sources/Catalyst-Model-DBI/META.yml b/sources/Catalyst-Model-DBI/META.yml
deleted file mode 100644
index 2c9a029..0000000
--- a/sources/Catalyst-Model-DBI/META.yml
+++ /dev/null
@@ -1,25 +0,0 @@
----
-abstract: unknown
-author:
- - 'Alex Pavlovic (alex.pavlovic at taskforce-1.com)'
-build_requires:
- ExtUtils::MakeMaker: 0
-configure_requires:
- ExtUtils::MakeMaker: 0
-dynamic_config: 1
-generated_by: 'ExtUtils::MakeMaker version 6.66, CPAN::Meta::Converter version 2.130880'
-license: unknown
-meta-spec:
- url: http://module-build.sourceforge.net/META-spec-v1.4.html
- version: 1.4
-name: Catalyst-Model-DBI
-no_index:
- directory:
- - t
- - inc
-requires:
- Catalyst: 5.00
- DBI: 0
- DBIx::Connector: 0
- MRO::Compat: 0
-version: 0.32
diff --git a/sources/Catalyst-Model-DBI/Makefile.PL b/sources/Catalyst-Model-DBI/Makefile.PL
deleted file mode 100644
index 77d6061..0000000
--- a/sources/Catalyst-Model-DBI/Makefile.PL
+++ /dev/null
@@ -1,13 +0,0 @@
-use ExtUtils::MakeMaker;
-
-WriteMakefile(
- NAME => 'Catalyst::Model::DBI',
- AUTHOR => 'Alex Pavlovic (alex.pavlovic at taskforce-1.com)',
- PREREQ_PM => {
- Catalyst => '5.00',
- DBI => 0,
- MRO::Compat => 0,
- DBIx::Connector => 0
- },
- VERSION_FROM => 'lib/Catalyst/Model/DBI.pm'
-);
\ No newline at end of file
diff --git a/sources/Catalyst-Model-DBI/README b/sources/Catalyst-Model-DBI/README
deleted file mode 100644
index 631f23a..0000000
--- a/sources/Catalyst-Model-DBI/README
+++ /dev/null
@@ -1,94 +0,0 @@
-NAME
- Catalyst::Model::DBI - DBI Model Class
-
-SYNOPSIS
- # use the helper to create a model for example
- perl script/myapp_create.pl model MyModel DBI dsn username password
-
- # lib/MyApp/Model/DBI.pm
- package MyApp::Model::DBI;
-
- use base 'Catalyst::Model::DBI';
-
- __PACKAGE__->config(
- dsn => 'DBI:Pg:dbname=mydb;host=localhost',
- username => 'pgsql',
- password => '',
- options => { AutoCommit => 1 },
- loglevel => 1
- );
-
- 1;
-
- # or load settings from a config file via Config::General for example
- # in your myapp.conf you could have
-
- name MyApp
-
- <Model::MyModel>
- dsn "DBI:Pg:dbname=mydb;host=localhost"
- username pgsql
- password ""
- <options>
- AutoCommit 1
- </options>
- loglevel 1
- </Model>
-
- # note that config settings always override Model settings
-
- # do something with $dbh inside a controller ...
- my $dbh = $c->model('MyModel')->dbh;
-
- # do something with $dbh inside a model ...
- my $dbh = $self->dbh;
-
- #do something with DBIx::Connector connection inside a controller ...
- my $connection = $c->model('MyModel')->connection;
-
- #do something with DBIx::Connector connection inside a model ...
- my $connection = $self->connection;
-
-DESCRIPTION
- This is the "DBI" model class. It has been rewritten to use
- DBIx::Connector since it's internal code that deals with connection
- maintenance has already been ported into there. You now have two options
- for doing custom models with Catalyst. Either by using this model and
- any related modules as needed or by having your custom model decoupled
- from Catalyst and glued on using Catalyst::Model::Adaptor
-
- Some general rules are as follows. If you do not wish to use
- DBIx::Connector directly or DBI and setup connections in your custom
- models or have glue models, then use this model. If you however need
- models that can be re-used outside of your application or simply wish to
- maintain connection code yourself outside of the Catalyst, then use
- Catalyst::Model::Adaptor which allows you to glue outside models into
- your Catalyst app.
-
-METHODS
- new Initializes DBI connection
-
- $self->connection
- Returns the current DBIx::Connector connection handle.
-
- $self->dbh
- Returns the current database handle.
-
- $self->connect
- Connects to the database and returns the handle.
-
-SEE ALSO
- Catalyst, DBI, Catalyst::Model::Proxy,
- Catalyst::Model::DBI::SQL::Library
-
-AUTHOR
- Alex Pavlovic, "alex.pavlovic at taskforce-1.com"
-
-COPYRIGHT
- Copyright (c) 2005 - 2012 the Catalyst::Model::DBI "AUTHOR" as listed
- above.
-
-LICENSE
- This program is free software, you can redistribute it and/or modify it
- under the same terms as Perl itself.
-
diff --git a/sources/Catalyst-Model-DBI/lib/Catalyst/Helper/Model/DBI.pm b/sources/Catalyst-Model-DBI/lib/Catalyst/Helper/Model/DBI.pm
deleted file mode 100644
index 1461174..0000000
--- a/sources/Catalyst-Model-DBI/lib/Catalyst/Helper/Model/DBI.pm
+++ /dev/null
@@ -1,102 +0,0 @@
-package Catalyst::Helper::Model::DBI;
-
-use strict;
-use File::Spec;
-
-our $VERSION = '0.32';
-
-=head1 NAME
-
-Catalyst::Helper::Model::DBI - Helper for DBI Models
-
-=head1 SYNOPSIS
-
- script/create.pl model DBI DBI dsn user password
-
-=head1 DESCRIPTION
-
-Helper for DBI Model.
-
-=head2 METHODS
-
-=over 4
-
-=item mk_compclass
-
-Reads the database and makes a main model class
-
-=item mk_comptest
-
-Makes tests for the DBI Model.
-
-=back
-
-=cut
-
-sub mk_compclass {
- my ( $self, $helper, $dsn, $user, $pass ) = @_;
- $helper->{dsn} = $dsn || '';
- $helper->{user} = $user || '';
- $helper->{pass} = $pass || '';
- my $file = $helper->{file};
- $helper->render_file( 'dbiclass', $file );
- return 1;
-}
-
-=head1 SEE ALSO
-
-L<Catalyst::Manual>, L<Catalyst::Test>, L<Catalyst::Request>,
-L<Catalyst::Response>, L<Catalyst::Helper>
-
-=head1 AUTHOR
-
-Alex Pavlovic, C<alex.pavlovic at taskforce-1.com>
-
-=head1 LICENSE
-
-This library is free software . You can redistribute it and/or modify
-it under the same terms as perl itself.
-
-=cut
-
-1;
-__DATA__
-
-__dbiclass__
-package [% class %];
-
-use strict;
-use warnings;
-use parent 'Catalyst::Model::DBI';
-
-__PACKAGE__->config(
- dsn => '[% dsn %]',
- user => '[% user %]',
- password => '[% pass %]',
- options => {},
-);
-
-=head1 NAME
-
-[% class %] - DBI Model Class
-
-=head1 SYNOPSIS
-
-See L<[% app %]>
-
-=head1 DESCRIPTION
-
-DBI Model Class.
-
-=head1 AUTHOR
-
-[% author %]
-
-=head1 LICENSE
-
-This library is free software, you can redistribute it and/or modify
-it under the same terms as Perl itself.
-
-=cut
-
-1;
diff --git a/sources/Catalyst-Model-DBI/lib/Catalyst/Model/DBI.pm b/sources/Catalyst-Model-DBI/lib/Catalyst/Model/DBI.pm
deleted file mode 100644
index ea97728..0000000
--- a/sources/Catalyst-Model-DBI/lib/Catalyst/Model/DBI.pm
+++ /dev/null
@@ -1,198 +0,0 @@
-package Catalyst::Model::DBI;
-
-use strict;
-use base 'Catalyst::Model';
-
-use MRO::Compat;
-use mro 'c3';
-use DBIx::Connector;
-
-use constant LOG_LEVEL_BASIC => 1;
-use constant LOG_LEVEL_INTERMEDIATE => 2;
-use constant LOG_LEVEL_FULL => 3;
-
-our $VERSION = '0.32';
-
-__PACKAGE__->mk_accessors( qw/_connection _dbh/ );
-
-=head1 NAME
-
-Catalyst::Model::DBI - DBI Model Class
-
-=head1 SYNOPSIS
-
- # use the helper to create a model for example
- perl script/myapp_create.pl model MyModel DBI dsn username password
-
- # lib/MyApp/Model/DBI.pm
- package MyApp::Model::DBI;
-
- use base 'Catalyst::Model::DBI';
-
- __PACKAGE__->config(
- dsn => 'DBI:Pg:dbname=mydb;host=localhost',
- username => 'pgsql',
- password => '',
- options => { AutoCommit => 1 },
- loglevel => 1
- );
-
- 1;
-
- # or load settings from a config file via Config::General for example
- # in your myapp.conf you could have
-
- name MyApp
-
- <Model::MyModel>
- dsn "DBI:Pg:dbname=mydb;host=localhost"
- username pgsql
- password ""
- <options>
- AutoCommit 1
- </options>
- loglevel 1
- </Model>
-
- # note that config settings always override Model settings
-
- # do something with $dbh inside a controller ...
- my $dbh = $c->model('MyModel')->dbh;
-
- # do something with $dbh inside a model ...
- my $dbh = $self->dbh;
-
- #do something with DBIx::Connector connection inside a controller ...
- my $connection = $c->model('MyModel')->connection;
-
- #do something with DBIx::Connector connection inside a model ...
- my $connection = $self->connection;
-
-=head1 DESCRIPTION
-
-This is the C<DBI> model class. It has been rewritten to use L<DBIx::Connector> since it's internal code
-that deals with connection maintenance has already been ported into there. You now have two options for
-doing custom models with Catalyst. Either by using this model and any related modules as needed
-or by having your custom model decoupled from Catalyst and glued on using L<Catalyst::Model::Adaptor>
-
-Some general rules are as follows. If you do not wish to use L<DBIx::Connector> directly or DBI and setup
-connections in your custom models or have glue models, then use this model. If you however need models that
-can be re-used outside of your application or simply wish to maintain connection code yourself outside of
-the Catalyst, then use L<Catalyst::Model::Adaptor> which allows you to glue outside models into your Catalyst app.
-
-=head1 METHODS
-
-=over 4
-
-=item new
-
-Initializes DBI connection
-
-=cut
-
-sub new {
- my $self = shift->next::method( @_ );
- my ( $c, $config ) = @_;
-
- $self->{dsn} ||= $config->{dsn};
- $self->{username} ||= $config->{username} || $config->{user};
- $self->{password} ||= $config->{password} || $config->{pass};
- $self->{options} ||= $config->{options};
-
- $self->{namespace} ||= ref $self;
- $self->{additional_base_classes} ||= ();
- $self->{log} = $c->log;
- $self->{debug} = $c->debug;
- $self->{loglevel} ||= LOG_LEVEL_BASIC;
-
- return $self;
-}
-
-=item $self->connection
-
-Returns the current DBIx::Connector connection handle.
-
-=cut
-
-sub connection {
- return shift->connect( 0 ) ;
-}
-
-=item $self->dbh
-
-Returns the current database handle.
-
-=cut
-
-sub dbh {
- return shift->connect( 1 );
-}
-
-=item $self->connect
-
-Connects to the database and returns the handle.
-
-=cut
-
-sub connect {
- my ( $self, $want_dbh ) = @_;
-
- my $connection = $self->_connection;
- my $dbh = $self->_dbh;
-
- my $log = $self->{log};
- my $debug = $self->{debug};
- my $loglevel = $self->{loglevel};
-
- unless ( $connection ) {
- eval {
- $connection = DBIx::Connector->new(
- $self->{dsn},
- $self->{username} || $self->{user},
- $self->{password} || $self->{pass},
- $self->{options}
- );
- $dbh = $connection->dbh;
- $self->_dbh( $dbh );
- $self->_connection( $connection );
- };
-
- if ($@) {
- $log->debug(
- qq/Couldn't connect to the database via DBIx::Connector "$@"/
- ) if $debug && $loglevel >= LOG_LEVEL_BASIC;
- } else {
- $log->debug(
- 'Connected to the database using DBIx::Connector via dsn:' . $self->{dsn}
- ) if $debug && $loglevel >= LOG_LEVEL_BASIC;
- }
- }
-
- my $handle = $want_dbh ? $dbh : $connection;
- return $handle;
-}
-
-=back
-
-=head1 SEE ALSO
-
-L<Catalyst>, L<DBI>, L<Catalyst::Model::Proxy>, L<Catalyst::Model::DBI::SQL::Library>
-
-=head1 AUTHOR
-
-Alex Pavlovic, C<alex.pavlovic at taskforce-1.com>
-
-=head1 COPYRIGHT
-
-Copyright (c) 2005 - 2012
-the Catalyst::Model::DBI L</AUTHOR>
-as listed above.
-
-=head1 LICENSE
-
-This program is free software, you can redistribute it and/or modify it
-under the same terms as Perl itself.
-
-=cut
-
-1;
diff --git a/sources/Catalyst-Model-DBI/t/01use.t b/sources/Catalyst-Model-DBI/t/01use.t
deleted file mode 100644
index 4a9e4df..0000000
--- a/sources/Catalyst-Model-DBI/t/01use.t
+++ /dev/null
@@ -1,5 +0,0 @@
-use strict;
-use Test::More tests => 2;
-
-BEGIN { use_ok('Catalyst::Model::DBI') }
-BEGIN { use_ok('Catalyst::Helper::Model::DBI') }
diff --git a/sources/Catalyst-Model-DBI/t/02pod.t b/sources/Catalyst-Model-DBI/t/02pod.t
deleted file mode 100644
index 1647794..0000000
--- a/sources/Catalyst-Model-DBI/t/02pod.t
+++ /dev/null
@@ -1,7 +0,0 @@
-use Test::More;
-
-eval "use Test::Pod 1.14";
-plan skip_all => 'Test::Pod 1.14 required' if $@;
-plan skip_all => 'set TEST_POD to enable this test' unless $ENV{TEST_POD};
-
-all_pod_files_ok();
diff --git a/sources/Catalyst-Model-DBI/t/03podcoverage.t b/sources/Catalyst-Model-DBI/t/03podcoverage.t
deleted file mode 100644
index d91be5e..0000000
--- a/sources/Catalyst-Model-DBI/t/03podcoverage.t
+++ /dev/null
@@ -1,7 +0,0 @@
-use Test::More;
-
-eval "use Test::Pod::Coverage 1.04";
-plan skip_all => 'Test::Pod::Coverage 1.04 required' if $@;
-plan skip_all => 'set TEST_POD to enable this test' unless $ENV{TEST_POD};
-
-all_pod_coverage_ok();
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libcatalyst-modules-perl.git
More information about the Pkg-perl-cvs-commits
mailing list