[prev in list] [next in list] [prev in thread] [next in thread]
List: mason-cvs
Subject: [Mason-checkins] CVS: mason/dist/lib/HTML/Mason ApacheHandler.pm,1.145,1.146
From: Dave Rolsky <autarch () users ! sourceforge ! net>
Date: 2002-02-24 6:31:44
[Download RAW message or body]
Update of /cvsroot/mason/mason/dist/lib/HTML/Mason
In directory usw-pr-cvs1:/tmp/cvs-serv8272
Modified Files:
ApacheHandler.pm
Log Message:
fix a number of bugs related to the Apache::Status code, also make it warning free
Index: ApacheHandler.pm
===================================================================
RCS file: /cvsroot/mason/mason/dist/lib/HTML/Mason/ApacheHandler.pm,v
retrieving revision 1.145
retrieving revision 1.146
diff -u -r1.145 -r1.146
--- ApacheHandler.pm 19 Feb 2002 22:40:29 -0000 1.145
+++ ApacheHandler.pm 24 Feb 2002 06:31:42 -0000 1.146
@@ -103,15 +103,6 @@
return wantarray ? @result : $result;
}
-sub print
-{
- my $self = shift;
-
- $self->top_buffer->receive(@_);
-}
-
-*out = \&print;
-
#----------------------------------------------------------------------
#
# APACHEHANDLER OBJECT
@@ -420,11 +411,11 @@
}
return ["<center><h2>" . $self->apache_status_title . "</h2></center>" ,
- $self->status_as_html,
- $self->interp->status_as_html];
+ $self->status_as_html(apache_req => $r),
+ $self->interp->status_as_html(ah => $self, apache_req => $r)];
};
local $^W = 0; # to avoid subroutine redefined warnings
- Apache::Status->menu_item($status_name++, $self->apache_status_title, $statsub);
+ Apache::Status->menu_item($status_name, $self->apache_status_title, $statsub);
}
my $interp = $self->interp;
@@ -447,7 +438,7 @@
# This is used in things like Apache::Status reports.
sub status_as_html {
- my ($self) = @_;
+ my ($self, %p) = @_;
# Should I be scared about this? =)
@@ -455,6 +446,7 @@
<h3>ApacheHandler properties:</h3>
<blockquote>
<tt>
+<table width="75%">
<%perl>
foreach my $property (sort keys %$ah) {
my $val = $ah->{$property};
@@ -468,10 +460,17 @@
$val =~ s,([\x00-\x1F]),'<font color="purple">control-' . chr( ord('A') + \
ord($1) - 1 ) . '</font>',eg; # does this work for non-ASCII? </%perl>
- <% $property |h %> => <% defined $val ? $val : '<i>undef</i>' %>
- <% $val eq $valid{$property}{default} ? '<font \
color=green>(default)</font>' : '' %>
- <br>
+ <tr>
+ <td>
+ <% $property | h %>
+ </td>
+ <td>
+ <% defined $val ? $val : '<i>undef</i>' %>
+ <% ( defined $val && defined $valid{$property}{default} && $val eq \
$valid{$property}{default} ) || ( ! defined $val && exists $valid{$property}{default} \
&& ! defined $valid{$property}{default} ) ? '<font color=green>(default)</font>' : '' \
%> + </td>
+ </tr>
% }
+</table>
</tt>
</blockquote>
@@ -482,10 +481,14 @@
EOF
my $interp = $self->interp;
- my $comp = $interp->make_anonymous_component(comp => $comp_text);
+ my $comp = $interp->make_component(comp_text => $comp_text);
my $out;
local $interp->{out_method} = \$out;
- $interp->exec($comp, ah => $self, valid => $interp->allowed_params);
+
+ my $request = $self->interp->make_request( ah => $self,
+ apache_req => $p{apache_req},
+ );
+ $request->exec($comp, ah => $self, valid => $interp->allowed_params);
return $out;
}
@@ -516,7 +519,6 @@
# 'ah' and 'apache_req' that's their problem.
#
my $request = $self->interp->make_request( ah => $self,
- interp => $interp,
apache_req => $apreq,
);
eval { $retval = $self->handle_request_1($apreq, $request) };
_______________________________________________
Mason-checkins mailing list
Mason-checkins@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-checkins
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic