Changeset 5801 for lang/perl/DBIx-Replicate
- Timestamp:
- 01/29/08 19:01:14 (5 years ago)
- Location:
- lang/perl/DBIx-Replicate/trunk
- Files:
-
- 5 modified
-
Makefile.PL (modified) (1 diff)
-
lib/DBIx/Replicate.pm (modified) (1 diff)
-
lib/DBIx/Replicate/Node.pm (modified) (2 diffs)
-
lib/DBIx/Replicate/Strategy/CopyBy.pm (modified) (3 diffs)
-
lib/DBIx/Replicate/Strategy/PK.pm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/DBIx-Replicate/trunk/Makefile.PL
r5771 r5801 1 use 5.008006; 2 use ExtUtils::MakeMaker; 3 # See lib/ExtUtils/MakeMaker.pm for details of how to influence 4 # the contents of the Makefile that is written. 5 WriteMakefile( 6 NAME => 'DBIx::Replicate', 7 VERSION_FROM => 'lib/DBIx/Replicate.pm', # finds $VERSION 8 PREREQ_PM => {}, # e.g., Module::Name => 1.1 9 ($] >= 5.005 ? ## Add these new keywords supported since 5.005 10 (ABSTRACT_FROM => 'lib/DBIx/Replicate.pm', # retrieve abstract from module 11 AUTHOR => '奥 一穂 <kazuho@apple.com>') : ()), 12 ); 1 use strict; 2 use inc::Module::Install; 3 4 name('DBIx-Replicate'); 5 all_from('lib/DBIx/Replicate.pm'); 6 7 requires 'Carp::Clan'; 8 requires 'Class::Accessor::Fast'; 9 requires 'Exporter', '5.60'; 10 requires 'List::Util'; 11 requires 'DBI'; 12 requires 'UNIVERSAL::require'; 13 14 auto_install; 15 WriteAll; -
lang/perl/DBIx-Replicate/trunk/lib/DBIx/Replicate.pm
r5799 r5801 4 4 use strict; 5 5 use warnings; 6 use AutoLoader qw/AUTOLOAD/;7 6 use Carp::Clan; 8 7 use DBI; 9 8 use DBIx::Replicate::Node; 10 use Time::HiRes qw/time sleep/;11 9 use UNIVERSAL::require; 12 10 use Exporter 'import'; -
lang/perl/DBIx-Replicate/trunk/lib/DBIx/Replicate/Node.pm
r5799 r5801 5 5 use warnings; 6 6 use base qw(Class::Accessor::Fast); 7 use Carp ();7 use Carp::Clan; 8 8 use UNIVERSAL::require; 9 9 10 __PACKAGE__->mk_accessors($_) for qw(conn sql_maker table);10 __PACKAGE__->mk_accessors($_) for qw(conn table); # sql_maker 11 11 12 12 sub new … … 16 16 17 17 foreach my $p (qw/conn table/) { 18 Carp::croak "required parameter $p is missing\n"18 croak "required parameter $p is missing\n" 19 19 unless $args->{$p}; 20 20 } 21 21 my $conn = $args->{conn}; 22 22 my $table = $args->{table}; 23 my $sql_maker_class = $args->{sql_maker_class} || 'SQL::Abstract::Limit';24 my $sql_maker_args = $args->{sql_maker_args} || { limit_dialect => $conn };23 # my $sql_maker_class = $args->{sql_maker_class} || 'SQL::Abstract::Limit'; 24 # my $sql_maker_args = $args->{sql_maker_args} || { limit_dialect => $conn }; 25 25 26 $sql_maker_class->require or die;27 my $sql_maker = $sql_maker_class->new( %{ $sql_maker_args } );26 # $sql_maker_class->require or die; 27 # my $sql_maker = $sql_maker_class->new( %{ $sql_maker_args } ); 28 28 my $self = $class->SUPER::new({ 29 29 conn => $conn, 30 30 table => $table, 31 sql_maker => $sql_maker31 # sql_maker => $sql_maker 32 32 }); 33 33 $self; -
lang/perl/DBIx-Replicate/trunk/lib/DBIx/Replicate/Strategy/CopyBy.pm
r5799 r5801 4 4 use strict; 5 5 use warnings; 6 use Carp ();6 use Carp::Clan; 7 7 use List::Util qw/min/; 8 8 … … 16 16 17 17 foreach my $p qw(copy_by) { 18 Carp::croak(ref($self) . ": required parameter $p is missing\n")18 croak(ref($self) . ": required parameter $p is missing\n") 19 19 unless $args->{$p}; 20 20 } … … 35 35 36 36 # copy using 'where key=x' 37 Carp::croak "multi-column per-value copy not supported\n"37 croak "multi-column per-value copy not supported\n" 38 38 unless @{$args->{copy_by}} == 1; 39 Carp::croak "extra_cond not supported by copy_by\n"39 croak "extra_cond not supported by copy_by\n" 40 40 if $extra_cond; 41 41 my $key_col = $args->{copy_by}->[0]; -
lang/perl/DBIx-Replicate/trunk/lib/DBIx/Replicate/Strategy/PK.pm
r5799 r5801 4 4 use strict; 5 5 use warnings; 6 use Carp ();6 use Carp::Clan; 7 7 8 8 sub new { bless {}, shift } … … 15 15 16 16 foreach my $p qw(primary_key) { 17 Carp::croak(ref($self) . ": required parameter $p is missing\n")17 croak(ref($self) . ": required parameter $p is missing\n") 18 18 unless $args->{$p}; 19 19 }
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)