'My::Web->heading();' is no longer compatible with: My::Web->http_moved()
[www.jankratochvil.net.git] / project / Rel.pm
index ae0d5f3..1cb01ae 100755 (executable)
@@ -24,20 +24,22 @@ use strict;
 use warnings;
 
 use My::Web;
-use Apache2::Const qw(HTTP_MOVED_TEMPORARILY);
+use Apache2::Const qw(HTTP_MOVED_PERMANENTLY);
 Wrequire 'project::Lib';
 
 
-our $HTML_TEST=0;
+our $HTML_TEST="download";
+our $HTML_TEST_RC=HTTP_MOVED_PERMANENTLY;
+our $HTML_TEST_QUERY_STRING='project=MyWeb&rel=next';
 
 sub handler
 {
 my $W=My::Web->init(
-               "header_only"=>1,
                "args_check"=>{
                                "rel"=>'^(?:prev|next)$',
                                "project"=>'^\w+$',
                                },
+               "header_only"=>1,
                );
 
 
@@ -66,10 +68,6 @@ for (0..$#projects) {
        last if $target;
        }
 
-$W->{"r"}->status(HTTP_MOVED_TEMPORARILY);
-$W->{"r"}->headers_out()->{"Location"}=path_web "./".($target && "$target/"),"abs"=>1;
-
-
-exit 0;
+My::Web->http_moved("./".(!$target ? "" : "$target/"),HTTP_MOVED_PERMANENTLY);
 }
 1;