The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

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

SYNOPSIS

  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

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

new

apply