You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-commits@perl.apache.org by to...@apache.org on 2010/04/11 13:49:07 UTC

svn commit: r932870 - /perl/Apache-Test/trunk/lib/Apache/TestUtil.pm

Author: torsten
Date: Sun Apr 11 11:49:07 2010
New Revision: 932870

URL: http://svn.apache.org/viewvc?rev=932870&view=rev
Log:
Fix a compatibility issue with Apache::TestUtil::t_start_error_log_watch
that made t/modperl/pnotes2.t fail.

Modified:
    perl/Apache-Test/trunk/lib/Apache/TestUtil.pm

Modified: perl/Apache-Test/trunk/lib/Apache/TestUtil.pm
URL: http://svn.apache.org/viewvc/perl/Apache-Test/trunk/lib/Apache/TestUtil.pm?rev=932870&r1=932869&r2=932870&view=diff
==============================================================================
--- perl/Apache-Test/trunk/lib/Apache/TestUtil.pm (original)
+++ perl/Apache-Test/trunk/lib/Apache/TestUtil.pm Sun Apr 11 11:49:07 2010
@@ -58,7 +58,7 @@ use constant INDENT     => 4;
 {
     my %files;
     sub t_start_file_watch (;$) {
-        my $name = @_ ? $_[0] : 'error_log';
+        my $name = defined $_[0] ? $_[0] : 'error_log';
         $name = File::Spec->catfile(Apache::Test::vars->{t_logs}, $name)
             unless (File::Spec->file_name_is_absolute($name));
 
@@ -74,7 +74,7 @@ use constant INDENT     => 4;
     }
 
     sub t_finish_file_watch (;$) {
-        my $name = @_ ? $_[0] : 'error_log';
+        my $name = defined $_[0] ? $_[0] : 'error_log';
         $name = File::Spec->catfile(Apache::Test::vars->{t_logs}, $name)
             unless (File::Spec->file_name_is_absolute($name));
 
@@ -88,7 +88,7 @@ use constant INDENT     => 4;
      }
 
     sub t_read_file_watch (;$) {
-        my $name = @_ ? $_[0] : 'error_log';
+        my $name = defined $_[0] ? $_[0] : 'error_log';
         $name = File::Spec->catfile(Apache::Test::vars->{t_logs}, $name)
             unless (File::Spec->file_name_is_absolute($name));
 
@@ -102,7 +102,7 @@ use constant INDENT     => 4;
     }
 
     sub t_start_error_log_watch {
-        t_start_file_watch undef;
+        t_start_file_watch;
     }
 
     sub t_finish_error_log_watch {