package Robots; use base main; use strict; use warnings; sub init{ my $self = shift; $self->nocache; } sub data{ my $self = shift; # Disallow sind alle URLs mit dem # Attribut auth my @disallow = (); foreach my $u( keys %{$self->{BIN}}){ push @disallow, $u if $self->{BIN}{$u}{auth}; } $self->{CONTENT} = do{ local $/ = undef; my $content = ; XR::xr( $content, { host => $ENV{HTTP_HOST}, disallow => [map {{ent=>$_}} @disallow] } ); }; $self->header('Content-Type' => 'text/plain; charset=UTF-8'); } 1;######################################################################### __DATA__ User-agent: * Allow: / Sitemap: http://%host%/sitemap.xml %loop_disallow% Disallow: %ent%%endloop%