GunghoX::FollowLinks::Rule - Rule To Decide If A Link Should Be Followed


GunghoX-FollowLinks documentation Contained in the GunghoX-FollowLinks distribution.

Index


Code Index:

NAME

Top

GunghoX::FollowLinks::Rule - Rule To Decide If A Link Should Be Followed

SYNOPSIS

Top

  use GunghoX::FollowLinks::Rule q(FOLLOW_ALLOW FOLLOW_DENY FOLLOW_DEFER);

  package MyRule;
  use base qw(GunghoX::FollowLinks::Rule);

  sub apply {
    # custom logic
  }

CONSTANTS

Top

FOLLOW_ALLOW

FOLLOW_DENY

FOLLOW_DEFER

METHODS

Top

apply

Subclasses must override this method. The exact arguments change depending on the GunghoX::FollowLinks::Parser object being used, but the first two elements are always the global Gungho context and the Gungho::Response object.


GunghoX-FollowLinks documentation Contained in the GunghoX-FollowLinks distribution.

# $Id: /mirror/perl/GunghoX-FollowLinks/trunk/lib/GunghoX/FollowLinks/Rule.pm 8918 2007-11-12T03:02:15.291385Z daisuke  $
#
# Copyright (c) 2007 Daisuke Maki <daisuke@endeworks.jp>
# All rights reserved.

package GunghoX::FollowLinks::Rule;
use strict;
use warnings;
use base qw(Gungho::Base);

use Sub::Exporter -setup => {
    exports => [ qw(FOLLOW_ALLOW FOLLOW_DENY FOLLOW_DEFER) ]
};
use constant FOLLOW_ALLOW => "FOLLOW_ALLOW";
use constant FOLLOW_DENY  => "FOLLOW_DENY";
use constant FOLLOW_DEFER => "FOLLOW_DEFER";

sub apply { die "You must override apply()" }

1;

__END__