
Mac::Gestalt - Macintosh Toolbox Interface to the Gestalt Manager

# Only bring in the names we want
use Mac::Gestalt qw(%Gestalt gestaltAppleTalkVersion);
if ( $Gestalt{gestaltAppleTalkVersion} lt "58" ) {
warn "Unable to use AppleTalk\n";
}

You can use the Gestalt function or the %Gestalt tied hash to obtain information about the operating environment. You specify what information you need by passing one of the selector codes recognized by Gestalt.
There is a huge list of codes. Many of them return a bitmask, so to find out whether e.g. the Code Fragment Manager is present, you write
$Gestalt{gestaltCFMAttr} & (1 << gestaltCFMPresent)
Address mode.
Alias manager.
AppleTalk.
A/UX.
CloseView.
Code Fragment Manager.
ColorSync.
ColorSync version.
Communications toolbox connection manager.
Component manager.
Color picker.
CPU type.
Communications toolbox connection resource manager.
Control strip manager.
Communications toolbox.
Database access manager.
Dictionary manager.
Dialog manager extensions.
Display manager.
Display manager version.
Drag manager.
Easy access.
Edition manager.
AppleEvent manager.
Finder attributes.
Folder manager.
Font manager.
680X0 FPU.
File system attributes.
File system manager.
File transfer manager.
QuickDraw GX attributes.
QuickDraw GX version.
Hardware attributes.
Help manager.
QuickTime image compression manager.
Icon utilities.
Keyboard types.
Size of low memory area.
Locical RAM size.