+my($class,$W)=@_;
+
+ my $self={};
+ $self->{"W"}=$W or confess "Missing W";
+ return bless $self,$class;
+}
+
+sub WRITE
+{
+my($self,$scalar,$length,$offset)=@_;
+
+ Wprint substr($scalar,0,$length);
+}
+
+# /home/user/www/webdir
+sub dir_top_abs_disk()
+{
+ our $dir_top_abs_disk;
+ if (!$dir_top_abs_disk) {
+ my $selfpkg_relpath=__PACKAGE__;
+ $selfpkg_relpath=~s{::}{/}g;
+ $selfpkg_relpath.=".pm";
+ my $selfpkg_abspath=$INC{$selfpkg_relpath} or do {
+ cluck "Unable to find self package $selfpkg_relpath";
+ return;
+ };
+ $selfpkg_abspath=~s{/*\Q$selfpkg_relpath\E$}{} or do {
+ cluck "Unable to strip myself \"$selfpkg_relpath\" from the abspath: $selfpkg_abspath";
+ return;
+ };
+ cluck "INC{myself} is relative?: $selfpkg_abspath" if $selfpkg_abspath!~m{^/};
+ $dir_top_abs_disk=$selfpkg_abspath;
+ }
+ return $dir_top_abs_disk;
+}
+
+sub unparsed_uri()
+{
+ if (!$W->{"unparsed_uri"}) {
+ # Do not: $W->{"r"}
+ # as we may be called before &init from: &My::Project::init
+ my $r=Apache2::RequestUtil->request();
+ cluck "Calling ".'&unparsed_uri'." from a static code, going to fail" if !$r;
+ my $uri_string=$r->unparsed_uri() or cluck "Valid 'r' missing unparsed_uri()?";
+ my $uri=URI->new_abs($uri_string,"http://".($W->{"web_hostname"}||$WebConfig{"web_hostname"})."/");
+ $W->{"unparsed_uri"}=$uri;
+ }
+ return $W->{"unparsed_uri"};