Games-Axmud

 view release on metacpan or  search on metacpan

lib/Games/Axmud/Obj/File.pm  view on Meta::CPAN

            '# Show Locator task debug messages',
                $self->convert($client->debugLocatorFlag),
            '# Show extensive Locator task debug messages',
                $self->convert($client->debugMaxLocatorFlag),
            '# Show illegal exit direction debug messages',
                $self->convert($client->debugExitFlag),
            '# Show Locator task expected room statements',
                $self->convert($client->debugMoveListFlag),
            '# Show object parsing debug messages',
                $self->convert($client->debugParseObjFlag),
            '# Show object comparison debug messages',
                $self->convert($client->debugCompareObjFlag),
            '# Show plugin failure debug messages',
                $self->convert($client->debugExplainPluginFlag),
            '# Show non-existent IV debug messages',
                $self->convert($client->debugCheckIVFlag),
            '# Show errors when table objects can\'t be added/resized',
                $self->convert($client->debugTableFitFlag),
            '# Show Perl errors/warnings in \'main\' window',
                $self->convert($client->debugTrapErrorFlag),
            '# Show toolbar button labels',
                $self->convert($client->toolbarLabelFlag),
            '# Show irreversible icon in \'edit\' windows',
                $self->convert($client->irreversibleIconFlag),
            '# Allow popup windows showing the ' . $axmud::SCRIPT . ' logo',
                $self->convert($client->allowBusyWinFlag),
            '# Allow system messages to be displayed in the \'main\' window',
                $self->convert($client->mainWinSystemMsgFlag),
            '# Set \'main\' window\'s urgency hint when text received',
                $self->convert($client->mainWinUrgencyFlag),
            '# Show tooltips in a session\'s default tab',
                $self->convert($client->mainWinTooltipFlag),
            '# Session tab mode',
                $client->sessionTabMode,
            '# Use xterm titles',
                $self->convert($client->xTermTitleFlag),
            '# Use long world names in tab labels',
                $self->convert($client->longTabLabelFlag),
            '# Don\'t use tab labels when only one session open',
                $self->convert($client->simpleTabFlag),
            '# Prompt user before closing \'main\' window',
                $self->convert($client->confirmCloseMainWinFlag),
            '# Prompt user before closing \'main\' window tabs',
                $self->convert($client->confirmCloseTabFlag),
            '# Prompt user before closing session from the \'main\' window menu',
                $self->convert($client->confirmCloseMenuFlag),
            '# Prompt user before closing session from the \'main\' window toolbar',
                $self->convert($client->confirmCloseToolButtonFlag),
            '# Character set',
                $client->charSet,
            '# Maximum concurrent sessions',
                $client->sessionMax,
            '# Switch to \'offline\' mode on disconnection',
                $self->convert($client->offlineOnDisconnectFlag),
            '# Store connection history',
                $self->convert($client->connectHistoryFlag),
            '# Use page up (etc) to scroll in textviews',
                $self->convert($client->useScrollKeysFlag),
            '# Page up (etc) doesn\'t scroll the entire page length',
                $self->convert($client->smoothScrollKeysFlag),
            '# Page up (etc) auto-engages split mode',
                $self->convert($client->autoSplitKeysFlag),
            '# Use tab/cursor keys to auto-complete commands',
                $self->convert($client->useCompleteKeysFlag),
            '# Use tab to switch between sessions',
                $self->convert($client->useSwitchKeysFlag),
            '@@@ eos',
        );

        # Prepare footer
        push @list, ('@@@ eof');

        # Add newline characters to every entry in @list before writing the whole list to the file
        foreach my $item (@list) {

            $item .= "\n";
        }

        print $fileHandle @list;

        # Writing complete
        $result = close $fileHandle;

        # Precautions taken when an emergency save is NOT in progress...
        if (! $emergFlag) {

            # Release the lock on the semaphore file
            $self->releaseFileLock($semaphoreHandle);

            if (! $result) {

                # Restore the config file from backup
                File::Copy::copy($backupFile, $path);

                # Set global flags and display an error message
                return $self->disableSaveLoad(FALSE);

            } elsif (! $axmud::CLIENT->autoRetainFileFlag) {

                # Delete the backup file, unless the user has opted to retain it
                unlink ($backupFile);
            }

            # Save the file's header (metadata) in this object's variables
            $self->ivPoke('scriptName', $axmud::NAME_FILE);
            $self->ivPoke('scriptVersion', $axmud::VERSION);
            $self->ivPoke(
                'scriptConvertVersion',
                $axmud::CLIENT->convertVersion($axmud::VERSION),
            );
            $self->ivPoke('saveDate', $saveDate);
            $self->ivPoke('saveTime', $saveTime);
            $self->ivUndef('assocWorldProf');

            $self->ivPoke('actualFileName', $fileName);
            $self->ivPoke('actualPath', $path);
            $self->ivPoke('actualDir', $dir);

            # If Axmud has been ported from MS Windows to Linux (or vice versa), the old config file
            #   will have been read, and there will now be two. Delete the old one (which we no
            #   longer need)



( run in 1.022 second using v1.01-cache-2.11-cpan-71847e10f99 )