MIME::ToolUtils

MIME::Tools | MIME::Body | MIME::Decoder | MIME::Entity
MIME::Head | MIME::IO | MIME::Latin1 | MIME::Parser
MIME::ParserBase | MIME::ToolUtils | MIME::Tools | MIME::Words

# MIME:: ToolUtils | NAME SYNOPSIS DESCRIPTION PUBLIC INTERFACE CONFIGURATION VARIABLES AUTHOR VERSION

# NAME

MIME::ToolUtils - MIME-tools kit configuration and utilities

# SYNOPSIS

        # Get current debugging flag, and invert it:
        $current = config MIME::ToolUtils 'DEBUGGING';
        config MIME::ToolUtils DEBUGGING => !$current;

# DESCRIPTION

A catch-all place for miscellaneous global information related to the configuration of the MIME-tools kit.

Since most of the MIME-tools modules "use" it by name, this module is really not subclassable.

# PUBLIC INTERFACE

config [VARIABLE, [VALUE]]
  Class method. Set/get a configuration variable:

          # Get current debugging flag:
          $current = config MIME::ToolUtils 'DEBUGGING';

          # Invert it:
          config MIME::ToolUtils DEBUGGING => !$current;

  The complete list of configuration variables is listed below. They are all-uppercase, possibly with underscores. To get a list of all valid config variables in your program, and output their current values, you can say:

          foreach $var (sort (config MIME::ToolUtils)) {
             print "MIME config $var = ", (config MIME::ToolUtils $var), "\n";
          }

  Note that some of these variables may have nice printed representations, while others may not.

  Rationale: I wanted access to the configuration to be done via some kind of controllable public interface, in case "setting a config variable" involved making a subroutine call. This approach is an attempt to do so while preventing an explosion of lots of little methods, many of which will do nothing more than set an entry in the internal %CONFIG hash. I suppose a tied hash would have been slicker.

# CONFIGURATION VARIABLES

You may set/get all of these via the `config` method.

DEBUGGING
  Value should be a boolean: true to turn debugging on, false to turn it off.

EMULATE_TMPFILE
  Obsolete. Prior to our 4.x release, this determined how to patch a Perl 5.004 bug in FileHandle::new_tmpfile, and get a FileHandle object which really will be destroyed when it goes out of scope. The bug has been corrected in 5.004, so this option (and much of the bulky code which supported it) was removed; pre-5.004 installations will use the "opendup" emulation, which has been hardcoded.

EMULATE_VERSION
  Emulate the behavior of a previous version of the MIME-tools kit (a.k.a the MIME-parser kit in its version 1.x incarnations). Since 1.x emulation was turned off in 4.x, this doesn't really do anything currently.

QUIET
  Most of the warnings from this toolkit may be silenced if you set QUIET true. The default is false.

VERSION
  Read-only. The version of the toolkit.

          config MIME::ToolUtils VERSION => 1.0;

  Please notice that as of 3.x, this happens to be the same as the $MIME::ToolUtils::VERSION: however, this was not always the case, and someday may not be the case again.

# AUTHOR

Eryq (eryq@zeegee.com), ZeeGee Software Inc (http://www.zeegee.com).

All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

# VERSION

$Revision: 4.104 $ $Date: 1999/02/09 03:32:38 $

Note: this file is used to set the version of the entire MIME-tools distribution.

Last updated: Wed May 12 11:27:55 1999
Generated by pod2coolhtml 1.104. Want a copy? Just email eryq@zeegee.com. (Yes, it's free.)