The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

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

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

Copyright (c) 1996, 1997 by Eryq / eryq@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.102 $ $Date: 1997/12/14 03:07:10 $

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