Changeset 581

Show
Ignore:
Timestamp:
04/12/02 03:20:56
Author:
miyagawa
Message:

0.02

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Log-Dispatch-DBI/trunk/Changes

    r353 r581  
    11Revision history for Perl extension Log::Dispatch::DBI. 
     2 
     30.02  Fri Apr 12 03:20:40 JST 2002 
     4        * remove pseudo-hash. Now it requires Log::Dispatch 2.0 
    25 
    360.01  Wed Nov 28 06:49:14 2001 
  • Log-Dispatch-DBI/trunk/Makefile.PL

    r353 r581  
    66        Test::More => 0.32, 
    77        DBI => 0, 
    8         Log::Dispatch => 0, 
     8        Log::Dispatch => 2.0, 
    99        DBD::CSV => 0,          # for testing 
    1010        File::Temp => 0.12, 
  • Log-Dispatch-DBI/trunk/lib/Log/Dispatch/DBI.pm

    r353 r581  
    33use strict; 
    44use vars qw($VERSION); 
    5 $VERSION = '0.01'
     5$VERSION = 0.02
    66 
    7 require Log::Dispatch; 
    8  
     7use Log::Dispatch 2.00; 
    98use base qw(Log::Dispatch::Output); 
    10 use fields qw(dbh sth table _mine); 
    119 
    1210use DBI; 
     
    1614    my $class = ref $proto || $proto; 
    1715 
    18     my $self = do { 
    19         no strict 'refs'; 
    20         bless [ \%{"$class\::FIELDS"} ], $class; 
    21     }; 
     16    my $self = bless {}, $class; 
    2217    $self->_basic_init(%params); 
    2318    $self->_init(%params); 
     
    2722 
    2823sub _init { 
    29     my Log::Dispatch::DBI $self = shift; 
     24    my $self = shift; 
    3025    my %params = @_; 
    3126 
     
    4439 
    4540sub create_statement { 
    46     my Log::Dispatch::DBI $self = shift; 
     41    my $self = shift; 
    4742    return $self->{dbh}->prepare(<<"SQL"); 
    4843INSERT INTO $self->{table} (level, message) VALUES (?, ?) 
     
    5247 
    5348sub log_message { 
    54     my Log::Dispatch::DBI $self = shift; 
     49    my $self = shift; 
    5550    my %params = @_; 
    5651    $self->{sth}->execute(@params{qw(level message)}); 
     
    5853 
    5954sub DESTROY { 
    60     my Log::Dispatch::DBI $self = shift; 
     55    my $self = shift; 
    6156    if ($self->{_mine} && $self->{dbh}) { 
    6257        $self->{dbh}->disconnect;