Update of /cvsroot/http-webtest/HTTP-WebTest-Recorder/lib/HTTP/WebTest
In directory sc8-pr-cvs1:/tmp/cvs-serv13258/lib/HTTP/WebTest
Modified Files:
Recorder.pm
Log Message:
Added optional constructor parameter 'ui_path'
Index: Recorder.pm
===================================================================
RCS file: /cvsroot/http-webtest/HTTP-WebTest-Recorder/lib/HTTP/WebTest/Recorder.pm,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** Recorder.pm 3 Jan 2003 23:01:22 -0000 1.1.1.1
--- Recorder.pm 15 Jan 2003 21:15:58 -0000 1.2
***************
*** 30,36 ****
--- 30,45 ----
my $class = shift;
my $self = bless {}, $class;
+ my %param = @_;
+
+ my $ui_path = $param{ui_path} || 'webtest';
+ # strip leading and ending slashes
+ $ui_path =~ s|^ / (.*?) / $|$1|x;
+ $self->ui_path($ui_path);
+
return $self;
}
+ # path to web interface
+ *ui_path = make_access_method('UI_PATH');
# controller object
*controller = make_access_method('CONTROLLER',
***************
*** 46,50 ****
my $request = shift;
! if($request->uri->path =~ m|^ /webtest/(\w+) |x) {
# request for recorder web interface
return $self->controller->execute(recorder => $self,
--- 55,61 ----
my $request = shift;
! my $ui_path = $self->ui_path;
!
! if($request->uri->path =~ m|^ /\Q$ui_path\E/(\w+) |x) {
# request for recorder web interface
return $self->controller->execute(recorder => $self,
***************
*** 79,83 ****
=head1 COPYRIGHT
! Copyright (c) 2002 Ilya Martynov. All rights reserved.
This program is free software; you can redistribute it and/or modify
--- 90,94 ----
=head1 COPYRIGHT
! Copyright (c) 2003 Ilya Martynov. All rights reserved.
This program is free software; you can redistribute it and/or modify
|