Update of /cvsroot/sandweb/sandweb/lib/SandWeb
In directory usw-pr-cvs1:/tmp/cvs-serv561/lib/SandWeb
Modified Files:
Browse.pm
Log Message:
added debugging to browse, to help me debug a problem :)
Index: Browse.pm
===================================================================
RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Browse.pm,v
retrieving revision 1.24
retrieving revision 1.25
diff -U2 -r1.24 -r1.25
--- Browse.pm 2001/12/21 07:15:59 1.24
+++ Browse.pm 2002/01/02 22:35:30 1.25
@@ -14,9 +14,14 @@
my $class = shift;
my %args = @_;
+ my $username = $args{'username'};
+ my $template_dir = $args{'template_dir'};
+ my $users_dir = $args{'users_dir'};
+ my $log_obj = $args{'log_obj'};
my $self = bless {
- 'username' => $args{'username'},
- 'template_dir' => $args{'template_dir'},
- 'users_dir' => $args{'users_dir'},
+ 'username' => $username,
+ 'template_dir' => $template_dir,
+ 'users_dir' => $users_dir,
+ 'log_obj' => $log_obj,
}, $class;
@@ -38,4 +43,5 @@
my $users_dir = $self->_get_users_dir();
my $template_dir = $self->_get_template_dir();
+ my $log = $self->_get_log_obj;
my $sandbox = "$users_dir/$username";
my @vcs_commands = split (/ /, $vcs_commands );
@@ -97,5 +103,6 @@
- opendir(SANDBOX, "$sandbox/$path") || die "can't opendir $sandbox/$path : $!";
+ opendir(SANDBOX, "$sandbox/$path") || $log->debug("can't opendir $sandbox/$path : $!");
+ $log->debug("opened dir : $sandbox/$path");
my @entries = readdir(SANDBOX);
chomp @entries;
@@ -171,5 +178,5 @@
}
} else {
- $content->param(STATUS => 'No files.');
+ $content->param(STATUS => 'No files.');
}
@@ -208,4 +215,9 @@
my $self = shift;
return $self->{'template_dir'};
+}
+
+sub _get_log_obj {
+ my $self = shift;
+ return $self->{'log_obj'};
}
|