GunghoX::FollowLinks::Rule::MIME - Follow Based On MIME Type


GunghoX-FollowLinks documentation  | view source Contained in the GunghoX-FollowLinks distribution.

Index


NAME

Top

GunghoX::FollowLinks::Rule::MIME - Follow Based On MIME Type

SYNOPSIS

Top

  use GunghoX::FollowLinks::Rule::MIME;

  # Allow matched, deny unmatched, defer unknown
  my $rule = GunghoX::FollowLinks::Rule::MIME->new(
    types => [ qw(text/html text/plain) ]
  );

  # Deny unmatched, but allow if unknown
  my $rule = GunghoX::FollowLinks::Rule::MIME->new(
    unknown => FOLLOW_ALLOW,
    types   => [ qw(text/html) ]
  );

  # Only allow matched (deny unmatched, deny unknown)
  my $rule = GunghoX::FollowLinks::Rule::MIME->new(
    unknown => FOLLOW_DENY,
    types   => [ qw(text/html) ]
  );

DESCRIPTION

Top

Rule::MIME allows you to use the file name extensions to guess the MIME type of a link, and decided to follow or not based on the type

METHODS

Top

new

apply


GunghoX-FollowLinks documentation  | view source Contained in the GunghoX-FollowLinks distribution.