Changeset 364

Show
Ignore:
Timestamp:
12/06/01 19:27:00
Author:
miyagawa
Message:

instance

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Log-Dispatch-Config/trunk/lib/Log/Dispatch/Config.pm

    r363 r364  
    55$VERSION = '0.05'; 
    66 
    7 use AppConfig qw(:argcount); 
    87use base qw(Log::Dispatch); 
    98use fields qw(filename ctime); 
    10  
    119use vars qw($_Instance); 
     10 
     11use AppConfig qw(:argcount); 
    1212 
    1313sub configure { 
     
    6161    my %args; 
    6262    $args{callbacks} = $callback if defined $callback; 
    63     $_Instance = $class->new(%args); 
     63    my $instance = $class->new(%args); 
    6464 
    6565    for my $dispname (keys %dispatchers) { 
    6666        my $logclass = delete $dispatchers{$dispname}->{class}; 
    67         $_Instance->add( 
     67        $instance->add( 
    6868            $logclass->new( 
    6969                name => $dispname, 
     
    7474 
    7575    # config info 
    76     $_Instance->{filename}  = $file; 
    77     $_Instance->{ctime} = time; 
    78  
    79     return $_Instance; 
     76    $instance->{filename}  = $file; 
     77    $instance->{ctime} = time; 
     78 
     79    return $instance; 
    8080} 
    8181