Show
Ignore:
Timestamp:
01/29/08 19:01:14 (5 years ago)
Author:
daisuke
Message:

lang/perl/DBIx-Replicate; use Module::Install, fix up dependecies, remove SQL::Abstract for now

Location:
lang/perl/DBIx-Replicate/trunk
Files:
5 modified

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 ); 
     1use strict; 
     2use inc::Module::Install; 
     3 
     4name('DBIx-Replicate'); 
     5all_from('lib/DBIx/Replicate.pm'); 
     6 
     7requires 'Carp::Clan'; 
     8requires 'Class::Accessor::Fast'; 
     9requires 'Exporter', '5.60'; 
     10requires 'List::Util'; 
     11requires 'DBI'; 
     12requires 'UNIVERSAL::require'; 
     13 
     14auto_install; 
     15WriteAll; 
  • lang/perl/DBIx-Replicate/trunk/lib/DBIx/Replicate.pm

    r5799 r5801  
    44use strict; 
    55use warnings; 
    6 use AutoLoader qw/AUTOLOAD/; 
    76use Carp::Clan; 
    87use DBI; 
    98use DBIx::Replicate::Node; 
    10 use Time::HiRes qw/time sleep/; 
    119use UNIVERSAL::require; 
    1210use Exporter 'import'; 
  • lang/perl/DBIx-Replicate/trunk/lib/DBIx/Replicate/Node.pm

    r5799 r5801  
    55use warnings; 
    66use base qw(Class::Accessor::Fast); 
    7 use Carp(); 
     7use Carp::Clan; 
    88use UNIVERSAL::require; 
    99 
    10 __PACKAGE__->mk_accessors($_) for qw(conn sql_maker table); 
     10__PACKAGE__->mk_accessors($_) for qw(conn table); # sql_maker 
    1111 
    1212sub new 
     
    1616 
    1717    foreach my $p (qw/conn table/) { 
    18         Carp::croak "required parameter $p is missing\n" 
     18        croak "required parameter $p is missing\n" 
    1919            unless $args->{$p}; 
    2020    } 
    2121    my $conn = $args->{conn}; 
    2222    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 }; 
    2525 
    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 } ); 
    2828    my $self  = $class->SUPER::new({ 
    2929        conn => $conn, 
    3030        table => $table, 
    31         sql_maker => $sql_maker 
     31#        sql_maker => $sql_maker 
    3232    }); 
    3333    $self; 
  • lang/perl/DBIx-Replicate/trunk/lib/DBIx/Replicate/Strategy/CopyBy.pm

    r5799 r5801  
    44use strict; 
    55use warnings; 
    6 use Carp (); 
     6use Carp::Clan; 
    77use List::Util qw/min/; 
    88 
     
    1616 
    1717    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") 
    1919            unless $args->{$p}; 
    2020    } 
     
    3535 
    3636    # 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" 
    3838        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" 
    4040        if $extra_cond; 
    4141    my $key_col = $args->{copy_by}->[0]; 
  • lang/perl/DBIx-Replicate/trunk/lib/DBIx/Replicate/Strategy/PK.pm

    r5799 r5801  
    44use strict; 
    55use warnings; 
    6 use Carp(); 
     6use Carp::Clan; 
    77 
    88sub new { bless {}, shift } 
     
    1515 
    1616    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") 
    1818            unless $args->{$p}; 
    1919    }