stas01/10/20 23:53:28
Modified:ModPerl-Registry/t special_blocks.t
Added: ModPerl-Registry/t/cgi-bin special_blocks.pl
Log:
- adding the forgotten file
Revision ChangesPath
1.2 +2 -2 modperl-2.0/ModPerl-Registry/t/special_blocks.t
Index: special_blocks.t
===
RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/t/special_blocks.t,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- special_blocks.t 2001/10/19 07:36:13 1.1
+++ special_blocks.t 2001/10/21 06:53:28 1.2
@@ -22,7 +22,7 @@
# PerlRun always run BEGIN/END since it's never cached
my $alias = "perlrun";
-my $url = "/same_interp/$alias/blocks.pl";
+my $url = "/same_interp/$alias/special_blocks.pl";
my $same_interp = Apache::TestRequest::same_interp_tie($url);
ok t_cmp(
@@ -56,7 +56,7 @@
for my $alias (grep !/^perlrun$/, @aliases) {
-my $url = "/same_interp/$alias/blocks.pl";
+my $url = "/same_interp/$alias/special_blocks.pl";
my $same_interp = Apache::TestRequest::same_interp_tie($url);
# clear the cache of the registry package for the script in $url
1.1 modperl-2.0/ModPerl-Registry/t/cgi-bin/special_blocks.pl
Index: special_blocks.pl
===
#!perl -w
# test BEGIN/END blocks
use ModPerl::RegistryCooker ();
use vars qw($query);
$query = '' unless defined $query;
BEGIN {
$query = $ENV{QUERY_STRING};
}
print "Content-type: text/plain\r\n\r\n";
my $r = shift;
my %args = $r->Apache::args;
our $test = exists $args{test} ? $args{test} : '';
if ($test eq 'uncache') {
# mark the script as non-cached for the next execution
require ModPerl::RegistryCooker;
ModPerl::RegistryCooker::uncache_myself();
}
elsif ($test eq 'begin') {
print "begin ok" if $query eq 'test=begin';
# reset the global
$query = '';
}
END {
if ($test eq 'end') {
print "end ok";
}
}