[Jifty-commit] r4589 - in jifty/trunk: lib/Jifty/Plugin

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Fri Nov 30 17:37:03 EST 2007


Author: sartak
Date: Fri Nov 30 17:37:03 2007
New Revision: 4589

Modified:
   jifty/trunk/   (props changed)
   jifty/trunk/lib/Jifty/Plugin/Recorder.pm

Log:
 r48452 at onn:  sartak | 2007-11-30 17:36:57 -0500
 Recorder: Rename handle attribute to loghandle due to a possible conflict


Modified: jifty/trunk/lib/Jifty/Plugin/Recorder.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/Recorder.pm	(original)
+++ jifty/trunk/lib/Jifty/Plugin/Recorder.pm	Fri Nov 30 17:37:03 2007
@@ -2,7 +2,7 @@
 use strict;
 use warnings;
 use base qw/Jifty::Plugin Class::Data::Inheritable/;
-__PACKAGE__->mk_accessors(qw/start path handle/);
+__PACKAGE__->mk_accessors(qw/start path loghandle/);
 
 use Time::HiRes 'time';
 use YAML;
@@ -34,7 +34,7 @@
     $self->path($args{path});
     Jifty::Util->make_path($args{path});
 
-    $self->handle($self->get_handle);
+    $self->loghandle($self->get_loghandle);
 }
 
 =head2 before_request
@@ -52,11 +52,11 @@
     my $request = { cgi => $cgi, ENV => \%ENV, time => $delta };
     my $yaml = YAML::Dump($request);
 
-    eval { print { $self->handle } $yaml };
+    eval { print { $self->loghandle } $yaml };
     Jifty->log->error("Unable to append to request log: $@") if $@;
 }
 
-sub get_handle {
+sub get_loghandle {
     my $self = shift;
 
     my $name = sprintf '%s/%d-%d.log',
@@ -64,14 +64,14 @@
                 $self->start,
                 $$;
 
-    open my $handle, '>', $name or do {
+    open my $loghandle, '>', $name or do {
         Jifty->log->error("Unable to open $name for writing: $!");
         return;
     };
 
     Jifty->log->info("Logging all HTTP requests to $name.");
 
-    return $handle;
+    return $loghandle;
 }
 
 =head1 NAME


More information about the Jifty-commit mailing list