<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">NAME
    Apache::Module - Interface to Apache C module structures

SYNOPSIS
      use Apache::Module ();

      #below is the same as
      #&lt;IfModule mod_proxy&gt;
      #...
      #&lt;/IfModule&gt;

      if(Apache::Module-&gt;find("mod_proxy")) {
          ...;
      }

DESCRIPTION
    This module provides an interface to the list of apache modules
    configured with your httpd and their `module *' structures.

METHODS
    top_module
        This method returns a pointer the first module in Apache's internal
        list of modules.

           Example:

           my $top_module = Apache::Module-&gt;top_module;

           print "Configured modules: \n";

           for (my $modp = $top_module; $modp; $modp = $modp-&gt;next) {
                print $modp-&gt;name, "\n";
           }

    find($module_name)
        This method returns a pointer to the module structure if found,
        under otherwise.

          Example:

         for (qw(proxy perl include cgi)) {
             if(my $modp = Apache::Module-&gt;find($_)) {
                 print "$_ module is configured\n";
                 print "with enabled commands: \n";

                 for (my $cmd = $modp-&gt;cmds; $cmd; $cmd = $cmd-&gt;next) {
                     print "   ", $cmd-&gt;name, "\n";
                 }
             }
             else {
                 print "$_ module is not configured\n";
             }
         }

    handlers
        Returns a pointer to the list of content types the module will
        handle.

        Example:

            print "module ", $modp-&gt;name, " handles:\n";

            for (my $hand = $modp-&gt;handlers; $hand; $hand = $hand-&gt;next) {
                print $hand-&gt;content_type, "\n";
            }

    Other Stuff
        There's more you can do with this module, I will document it later.

AUTHOR
    Doug MacEachern

SEE ALSO
    Apache::Info(3), Apache(3), mod_perl(3).

</pre></body></html>