{
    "content": [
        {
            "type": "text",
            "text": "# Mail::Box::Locker::Flock (perldoc)\n\n## NAME\n\nMail::Box::Locker::Flock - lock a folder using kernel file-locking\n\n## SYNOPSIS\n\nSee Mail::Box::Locker\n\n## DESCRIPTION\n\nThe \"::Flock\" object locks the folder by creating an exclusive lock on the file using the\nkernel's \"flock\" facilities. This lock is created on a separate file-handle to the folder file,\nso not the handle which is reading.\n\n## Sections\n\n- **NAME**\n- **INHERITANCE**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **METHODS** (6 subsections)\n- **DIAGNOSTICS**\n- **SEE ALSO**\n- **LICENSE**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Mail::Box::Locker::Flock",
        "section": "",
        "mode": "perldoc",
        "summary": "Mail::Box::Locker::Flock - lock a folder using kernel file-locking",
        "synopsis": "See Mail::Box::Locker",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "INHERITANCE",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "METHODS",
                "lines": 2,
                "subsections": [
                    {
                        "name": "Constructors",
                        "lines": 20
                    },
                    {
                        "name": "Attributes",
                        "lines": 8
                    },
                    {
                        "name": "The Locker",
                        "lines": 11
                    },
                    {
                        "name": "Locking",
                        "lines": 10
                    },
                    {
                        "name": "Error handling",
                        "lines": 41
                    },
                    {
                        "name": "Cleanup",
                        "lines": 5
                    }
                ]
            },
            {
                "name": "DIAGNOSTICS",
                "lines": 22,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "LICENSE",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Mail::Box::Locker::Flock - lock a folder using kernel file-locking\n",
                "subsections": []
            },
            "INHERITANCE": {
                "content": "Mail::Box::Locker::Flock\nis a Mail::Box::Locker\nis a Mail::Reporter\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "See Mail::Box::Locker\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "The \"::Flock\" object locks the folder by creating an exclusive lock on the file using the\nkernel's \"flock\" facilities. This lock is created on a separate file-handle to the folder file,\nso not the handle which is reading.\n\nFile locking does not work in some situations, for instance for operating systems do not support\n\"flock\".\n\nExtends \"DESCRIPTION\" in Mail::Box::Locker.\n",
                "subsections": []
            },
            "METHODS": {
                "content": "Extends \"METHODS\" in Mail::Box::Locker.\n",
                "subsections": [
                    {
                        "name": "Constructors",
                        "content": "Extends \"Constructors\" in Mail::Box::Locker.\n\nMail::Box::Locker::Flock->new(%options)\n-Option --Defined in       --Default\nexpires  Mail::Box::Locker  1 hour\nfile     Mail::Box::Locker  undef\nfolder   Mail::Box::Locker  <undef>\nlog      Mail::Reporter     'WARNINGS'\nmethod   Mail::Box::Locker  'FLOCK'\ntimeout  Mail::Box::Locker  10\ntrace    Mail::Reporter     'WARNINGS'\n\nexpires => SECONDS\nfile => FILENAME\nfolder => FOLDER\nlog => LEVEL\nmethod => STRING|CLASS|ARRAY\ntimeout => SECONDS|'NOTIMEOUT'\ntrace => LEVEL\n"
                    },
                    {
                        "name": "Attributes",
                        "content": "Extends \"Attributes\" in Mail::Box::Locker.\n\n$obj->expires( [SECONDS] )\nInherited, see \"Attributes\" in Mail::Box::Locker\n\n$obj->timeout( [SECONDS] )\nInherited, see \"Attributes\" in Mail::Box::Locker\n"
                    },
                    {
                        "name": "The Locker",
                        "content": "Extends \"The Locker\" in Mail::Box::Locker.\n\n$obj->filename( [$filename] )\nInherited, see \"The Locker\" in Mail::Box::Locker\n\n$obj->folder( [$folder] )\nInherited, see \"The Locker\" in Mail::Box::Locker\n\n$obj->name()\nInherited, see \"The Locker\" in Mail::Box::Locker\n"
                    },
                    {
                        "name": "Locking",
                        "content": "Extends \"Locking\" in Mail::Box::Locker.\n\n$obj->hasLock()\nInherited, see \"Locking\" in Mail::Box::Locker\n\n$obj->isLocked()\n$obj->lock()\n$obj->unlock()\nInherited, see \"Locking\" in Mail::Box::Locker\n"
                    },
                    {
                        "name": "Error handling",
                        "content": "Extends \"Error handling\" in Mail::Box::Locker.\n\n$obj->AUTOLOAD()\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->addReport($object)\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->defaultTrace( [$level]|[$loglevel, $tracelevel]|[$level, $callback] )\nMail::Box::Locker::Flock->defaultTrace( [$level]|[$loglevel, $tracelevel]|[$level, $callback] )\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->errors()\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->log( [$level, [$strings]] )\nMail::Box::Locker::Flock->log( [$level, [$strings]] )\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->logPriority($level)\nMail::Box::Locker::Flock->logPriority($level)\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->logSettings()\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->notImplemented()\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->report( [$level] )\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->reportAll( [$level] )\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->trace( [$level] )\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->warnings()\nInherited, see \"Error handling\" in Mail::Reporter\n"
                    },
                    {
                        "name": "Cleanup",
                        "content": "Extends \"Cleanup\" in Mail::Box::Locker.\n\n$obj->DESTROY()\nInherited, see \"Cleanup\" in Mail::Box::Locker\n"
                    }
                ]
            },
            "DIAGNOSTICS": {
                "content": "Warning: Folder $folder already flocked\nThe folder is already locked, but you attempt to lock it again. The behavior of double\nflock's is platform dependent, and therefore should not be attempted. The second lock is\nignored (but the unlock isn't)\n\nError: Package $package does not implement $method.\nFatal error: the specific package (or one of its superclasses) does not implement this\nmethod where it should. This message means that some other related classes do implement this\nmethod however the class at hand does not. Probably you should investigate this and probably\ninform the author of the package.\n\nError: Unable to check lock file $filename for $folder: $!\nTo check whether the filename is used to flock a folder, the file must be opened. Apparently\nthis fails, which does not mean that the folder is locked neither that it is unlocked.\n\nError: Unable to open flock file $filename for $folder: $!\nFor flock-ing a folder it must be opened, which does not succeed for the specified reason.\n\nError: Will never get a flock at $filename for $folder: $!\nTried to flock the folder, but it did not succeed. The error code received from the OS\nindicates that it will not succeed ever, so we do not need to try again.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "This module is part of Mail-Box distribution version 3.009, built on August 18, 2020. Website:\nhttp://perl.overmeer.net/CPAN/\n",
                "subsections": []
            },
            "LICENSE": {
                "content": "Copyrights 2001-2020 by [Mark Overmeer]. For other contributors see ChangeLog.\n\nThis program is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself. See http://dev.perl.org/licenses/\n",
                "subsections": []
            }
        }
    }
}