{
    "content": [
        {
            "type": "text",
            "text": "# Archive::Extract (perldoc)\n\n**Summary:** Archive::Extract - A generic archive extracting mechanism\n\n**Synopsis:** use Archive::Extract;\n### build an Archive::Extract object ###\nmy $ae = Archive::Extract->new( archive => 'foo.tgz' );\n### extract to cwd() ###\nmy $ok = $ae->extract;\n### extract to /tmp ###\nmy $ok = $ae->extract( to => '/tmp' );\n### what if something went wrong?\nmy $ok = $ae->extract or die $ae->error;\n### files from the archive ###\nmy $files   = $ae->files;\n### dir that was extracted to ###\nmy $outdir  = $ae->extractpath;\n### quick check methods ###\n$ae->istar     # is it a .tar file?\n$ae->istgz     # is it a .tar.gz or .tgz file?\n$ae->isgz;     # is it a .gz file?\n$ae->iszip;    # is it a .zip file?\n$ae->isbz2;    # is it a .bz2 file?\n$ae->istbz;    # is it a .tar.bz2 or .tbz file?\n$ae->islzma;   # is it a .lzma file?\n$ae->isxz;     # is it a .xz file?\n$ae->istxz;    # is it a .tar.xz or .txz file?\n### absolute path to the archive you provided ###\n$ae->archive;\n### commandline tools, if found ###\n$ae->bintar     # path to /bin/tar, if found\n$ae->bingzip    # path to /bin/gzip, if found\n$ae->binunzip   # path to /bin/unzip, if found\n$ae->binbunzip2 # path to /bin/bunzip2 if found\n$ae->binunlzma  # path to /bin/unlzma if found\n$ae->binunxz    # path to /bin/unxz if found\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (43 lines)\n- **DESCRIPTION** (9 lines)\n- **METHODS** (66 lines)\n- **ACCESSORS** (66 lines)\n- **UTILITY FUNCTION** (12 lines)\n- **HOW IT WORKS** (9 lines)\n- **CAVEATS** (1 lines) — 3 subsections\n  - File Extensions (5 lines)\n  - Supporting Very Large Files (8 lines)\n  - Bunzip2 support of arbitrary extensions. (4 lines)\n- **GLOBAL VARIABLES** (26 lines)\n- **TODO / CAVEATS** (9 lines)\n- **BUG REPORTS** (2 lines)\n- **AUTHOR** (2 lines)\n- **COPYRIGHT** (3 lines)\n\n## Full Content\n\n### NAME\n\nArchive::Extract - A generic archive extracting mechanism\n\n### SYNOPSIS\n\nuse Archive::Extract;\n\n### build an Archive::Extract object ###\nmy $ae = Archive::Extract->new( archive => 'foo.tgz' );\n\n### extract to cwd() ###\nmy $ok = $ae->extract;\n\n### extract to /tmp ###\nmy $ok = $ae->extract( to => '/tmp' );\n\n### what if something went wrong?\nmy $ok = $ae->extract or die $ae->error;\n\n### files from the archive ###\nmy $files   = $ae->files;\n\n### dir that was extracted to ###\nmy $outdir  = $ae->extractpath;\n\n\n### quick check methods ###\n$ae->istar     # is it a .tar file?\n$ae->istgz     # is it a .tar.gz or .tgz file?\n$ae->isgz;     # is it a .gz file?\n$ae->iszip;    # is it a .zip file?\n$ae->isbz2;    # is it a .bz2 file?\n$ae->istbz;    # is it a .tar.bz2 or .tbz file?\n$ae->islzma;   # is it a .lzma file?\n$ae->isxz;     # is it a .xz file?\n$ae->istxz;    # is it a .tar.xz or .txz file?\n\n### absolute path to the archive you provided ###\n$ae->archive;\n\n### commandline tools, if found ###\n$ae->bintar     # path to /bin/tar, if found\n$ae->bingzip    # path to /bin/gzip, if found\n$ae->binunzip   # path to /bin/unzip, if found\n$ae->binbunzip2 # path to /bin/bunzip2 if found\n$ae->binunlzma  # path to /bin/unlzma if found\n$ae->binunxz    # path to /bin/unxz if found\n\n### DESCRIPTION\n\nArchive::Extract is a generic archive extraction mechanism.\n\nIt allows you to extract any archive file of the type .tar, .tar.gz, .gz, .Z, tar.bz2, .tbz,\n.bz2, .zip, .xz,, .txz, .tar.xz or .lzma without having to worry how it does so, or use\ndifferent interfaces for each type by using either perl modules, or commandline tools on your\nsystem.\n\nSee the \"HOW IT WORKS\" section further down for details.\n\n### METHODS\n\n$ae = Archive::Extract->new(archive => '/path/to/archive',[type => TYPE])\nCreates a new \"Archive::Extract\" object based on the archive file you passed it. Automatically\ndetermines the type of archive based on the extension, but you can override that by explicitly\nproviding the \"type\" argument, potentially by calling \"typefor()\".\n\nValid values for \"type\" are:\n\ntar Standard tar files, as produced by, for example, \"/bin/tar\". Corresponds to a \".tar\" suffix.\n\ntgz Gzip compressed tar files, as produced by, for example \"/bin/tar -z\". Corresponds to a\n\".tgz\" or \".tar.gz\" suffix.\n\ngz  Gzip compressed file, as produced by, for example \"/bin/gzip\". Corresponds to a \".gz\"\nsuffix.\n\nZ   Lempel-Ziv compressed file, as produced by, for example \"/bin/compress\". Corresponds to a\n\".Z\" suffix.\n\nzip Zip compressed file, as produced by, for example \"/bin/zip\". Corresponds to a \".zip\", \".jar\"\nor \".par\" suffix.\n\nbz2 Bzip2 compressed file, as produced by, for example, \"/bin/bzip2\". Corresponds to a \".bz2\"\nsuffix.\n\ntbz Bzip2 compressed tar file, as produced by, for example \"/bin/tar -j\". Corresponds to a\n\".tbz\" or \".tar.bz2\" suffix.\n\nlzma\nLzma compressed file, as produced by \"/bin/lzma\". Corresponds to a \".lzma\" suffix.\n\nxz  Xz compressed file, as produced by \"/bin/xz\". Corresponds to a \".xz\" suffix.\n\ntxz Xz compressed tar file, as produced by, for example \"/bin/tar -J\". Corresponds to a \".txz\"\nor \".tar.xz\" suffix.\n\nReturns a \"Archive::Extract\" object on success, or false on failure.\n\n$ae->extract( [to => '/output/path'] )\nExtracts the archive represented by the \"Archive::Extract\" object to the path of your choice as\nspecified by the \"to\" argument. Defaults to \"cwd()\".\n\nSince \".gz\" files never hold a directory, but only a single file; if the \"to\" argument is an\nexisting directory, the file is extracted there, with its \".gz\" suffix stripped. If the \"to\"\nargument is not an existing directory, the \"to\" argument is understood to be a filename, if the\narchive type is \"gz\". In the case that you did not specify a \"to\" argument, the output file will\nbe the name of the archive file, stripped from its \".gz\" suffix, in the current working\ndirectory.\n\n\"extract\" will try a pure perl solution first, and then fall back to commandline tools if they\nare available. See the \"GLOBAL VARIABLES\" section below on how to alter this behaviour.\n\nIt will return true on success, and false on failure.\n\nOn success, it will also set the follow attributes in the object:\n\n$ae->extractpath\nThis is the directory that the files where extracted to.\n\n$ae->files\nThis is an array ref with the paths of all the files in the archive, relative to the \"to\"\nargument you specified. To get the full path to an extracted file, you would use:\n\nFile::Spec->catfile( $to, $ae->files->[0] );\n\nNote that all files from a tar archive will be in unix format, as per the tar specification.\n\n### ACCESSORS\n\n$ae->error([BOOL])\nReturns the last encountered error as string. Pass it a true value to get the \"Carp::longmess()\"\noutput instead.\n\n$ae->extractpath\nThis is the directory the archive got extracted to. See \"extract()\" for details.\n\n$ae->files\nThis is an array ref holding all the paths from the archive. See \"extract()\" for details.\n\n$ae->archive\nThis is the full path to the archive file represented by this \"Archive::Extract\" object.\n\n$ae->type\nThis is the type of archive represented by this \"Archive::Extract\" object. See accessors below\nfor an easier way to use this. See the \"new()\" method for details.\n\n$ae->types\nReturns a list of all known \"types\" for \"Archive::Extract\"'s \"new\" method.\n\n$ae->istgz\nReturns true if the file is of type \".tar.gz\". See the \"new()\" method for details.\n\n$ae->istar\nReturns true if the file is of type \".tar\". See the \"new()\" method for details.\n\n$ae->isgz\nReturns true if the file is of type \".gz\". See the \"new()\" method for details.\n\n$ae->isZ\nReturns true if the file is of type \".Z\". See the \"new()\" method for details.\n\n$ae->iszip\nReturns true if the file is of type \".zip\". See the \"new()\" method for details.\n\n$ae->islzma\nReturns true if the file is of type \".lzma\". See the \"new()\" method for details.\n\n$ae->isxz\nReturns true if the file is of type \".xz\". See the \"new()\" method for details.\n\n$ae->bintar\nReturns the full path to your tar binary, if found.\n\n$ae->bingzip\nReturns the full path to your gzip binary, if found\n\n$ae->binunzip\nReturns the full path to your unzip binary, if found\n\n$ae->binunlzma\nReturns the full path to your unlzma binary, if found\n\n$ae->binunxz\nReturns the full path to your unxz binary, if found\n\n$bool = $ae->haveoldbunzip2\nOlder versions of \"/bin/bunzip2\", from before the \"bunzip2 1.0\" release, require all archive\nnames to end in \".bz2\" or it will not extract them. This method checks if you have a recent\nversion of \"bunzip2\" that allows any extension, or an older one that doesn't.\n\ndebug( MESSAGE )\nThis method outputs MESSAGE to the default filehandle if $DEBUG is true. It's a small method,\nbut it's here if you'd like to subclass it so you can so something else with any debugging\noutput.\n\n### UTILITY FUNCTION\n\ntypefor($archive)\nGiven an archive file name, it determins the type by parsing the file name extension. Used by\n\"new()\" when the \"type\" parameter is not passed. Also useful when the archive file does not\ninclude a suffix but the file name is otherwise known, such as when a file is uploaded to a web\nserver and stored with a temporary name that differs from the original name, and you want to use\nthe same detection pattern as Archive::Extract. Example:\n\nmy $ae = Archive::Extract->new(\narchive => '/tmp/02af6s',\ntype    => Archive::Extract::typefor('archive.zip'),\n);\n\n### HOW IT WORKS\n\n\"Archive::Extract\" tries first to determine what type of archive you are passing it, by\ninspecting its suffix. It does not do this by using Mime magic, or something related. See\n\"CAVEATS\" below.\n\nOnce it has determined the file type, it knows which extraction methods it can use on the\narchive. It will try a perl solution first, then fall back to a commandline tool if that fails.\nIf that also fails, it will return false, indicating it was unable to extract the archive. See\nthe section on \"GLOBAL VARIABLES\" to see how to alter this order.\n\n### CAVEATS\n\n#### File Extensions\n\n\"Archive::Extract\" trusts on the extension of the archive to determine what type it is, and what\nextractor methods therefore can be used. If your archives do not have any of the extensions as\ndescribed in the \"new()\" method, you will have to specify the type explicitly, or\n\"Archive::Extract\" will not be able to extract the archive for you.\n\n#### Supporting Very Large Files\n\n\"Archive::Extract\" can use either pure perl modules or command line programs under the hood.\nSome of the pure perl modules (like \"Archive::Tar\" and Compress::unLZMA) take the entire\ncontents of the archive into memory, which may not be feasible on your system. Consider setting\nthe global variable $Archive::Extract::PREFERBIN to 1, which will prefer the use of command\nline programs and won't consume so much memory.\n\nSee the \"GLOBAL VARIABLES\" section below for details.\n\n#### Bunzip2 support of arbitrary extensions.\n\nOlder versions of \"/bin/bunzip2\" do not support arbitrary file extensions and insist on a \".bz2\"\nsuffix. Although we do our best to guard against this, if you experience a bunzip2 error, it may\nbe related to this. For details, please see the \"haveoldbunzip2\" method.\n\n### GLOBAL VARIABLES\n\n$Archive::Extract::DEBUG\nSet this variable to \"true\" to have all calls to command line tools be printed out, including\nall their output. This also enables \"Carp::longmess\" errors, instead of the regular \"carp\"\nerrors.\n\nGood for tracking down why things don't work with your particular setup.\n\nDefaults to \"false\".\n\n$Archive::Extract::WARN\nThis variable controls whether errors encountered internally by \"Archive::Extract\" should be\n\"carp\"'d or not.\n\nSet to false to silence warnings. Inspect the output of the \"error()\" method manually to see\nwhat went wrong.\n\nDefaults to \"true\".\n\n$Archive::Extract::PREFERBIN\nThis variables controls whether \"Archive::Extract\" should prefer the use of perl modules, or\ncommandline tools to extract archives.\n\nSet to \"true\" to have \"Archive::Extract\" prefer commandline tools.\n\nDefaults to \"false\".\n\n### TODO / CAVEATS\n\nMime magic support\nMaybe this module should use something like \"File::Type\" to determine the type, rather than\nblindly trust the suffix.\n\nThread safety\nCurrently, \"Archive::Extract\" does a \"chdir\" to the extraction dir before extraction, and a\n\"chdir\" back again after. This is not necessarily thread safe. See \"rt.cpan.org\" bug\n\"#45671\" for details.\n\n### BUG REPORTS\n\nPlease report bugs or other issues to <bug-archive-extract@rt.cpan.org>.\n\n### AUTHOR\n\nThis module by Jos Boumans <kane@cpan.org>.\n\n### COPYRIGHT\n\nThis library is free software; you may redistribute and/or modify it under the same terms as\nPerl itself.\n\n"
        }
    ],
    "structuredContent": {
        "command": "Archive::Extract",
        "section": "",
        "mode": "perldoc",
        "summary": "Archive::Extract - A generic archive extracting mechanism",
        "synopsis": "use Archive::Extract;\n### build an Archive::Extract object ###\nmy $ae = Archive::Extract->new( archive => 'foo.tgz' );\n### extract to cwd() ###\nmy $ok = $ae->extract;\n### extract to /tmp ###\nmy $ok = $ae->extract( to => '/tmp' );\n### what if something went wrong?\nmy $ok = $ae->extract or die $ae->error;\n### files from the archive ###\nmy $files   = $ae->files;\n### dir that was extracted to ###\nmy $outdir  = $ae->extractpath;\n### quick check methods ###\n$ae->istar     # is it a .tar file?\n$ae->istgz     # is it a .tar.gz or .tgz file?\n$ae->isgz;     # is it a .gz file?\n$ae->iszip;    # is it a .zip file?\n$ae->isbz2;    # is it a .bz2 file?\n$ae->istbz;    # is it a .tar.bz2 or .tbz file?\n$ae->islzma;   # is it a .lzma file?\n$ae->isxz;     # is it a .xz file?\n$ae->istxz;    # is it a .tar.xz or .txz file?\n### absolute path to the archive you provided ###\n$ae->archive;\n### commandline tools, if found ###\n$ae->bintar     # path to /bin/tar, if found\n$ae->bingzip    # path to /bin/gzip, if found\n$ae->binunzip   # path to /bin/unzip, if found\n$ae->binbunzip2 # path to /bin/bunzip2 if found\n$ae->binunlzma  # path to /bin/unlzma if found\n$ae->binunxz    # path to /bin/unxz if found",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 43,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "METHODS",
                "lines": 66,
                "subsections": []
            },
            {
                "name": "ACCESSORS",
                "lines": 66,
                "subsections": []
            },
            {
                "name": "UTILITY FUNCTION",
                "lines": 12,
                "subsections": []
            },
            {
                "name": "HOW IT WORKS",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "CAVEATS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "File Extensions",
                        "lines": 5
                    },
                    {
                        "name": "Supporting Very Large Files",
                        "lines": 8
                    },
                    {
                        "name": "Bunzip2 support of arbitrary extensions.",
                        "lines": 4
                    }
                ]
            },
            {
                "name": "GLOBAL VARIABLES",
                "lines": 26,
                "subsections": []
            },
            {
                "name": "TODO / CAVEATS",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "BUG REPORTS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 3,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Archive::Extract - A generic archive extracting mechanism\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use Archive::Extract;\n\n### build an Archive::Extract object ###\nmy $ae = Archive::Extract->new( archive => 'foo.tgz' );\n\n### extract to cwd() ###\nmy $ok = $ae->extract;\n\n### extract to /tmp ###\nmy $ok = $ae->extract( to => '/tmp' );\n\n### what if something went wrong?\nmy $ok = $ae->extract or die $ae->error;\n\n### files from the archive ###\nmy $files   = $ae->files;\n\n### dir that was extracted to ###\nmy $outdir  = $ae->extractpath;\n\n\n### quick check methods ###\n$ae->istar     # is it a .tar file?\n$ae->istgz     # is it a .tar.gz or .tgz file?\n$ae->isgz;     # is it a .gz file?\n$ae->iszip;    # is it a .zip file?\n$ae->isbz2;    # is it a .bz2 file?\n$ae->istbz;    # is it a .tar.bz2 or .tbz file?\n$ae->islzma;   # is it a .lzma file?\n$ae->isxz;     # is it a .xz file?\n$ae->istxz;    # is it a .tar.xz or .txz file?\n\n### absolute path to the archive you provided ###\n$ae->archive;\n\n### commandline tools, if found ###\n$ae->bintar     # path to /bin/tar, if found\n$ae->bingzip    # path to /bin/gzip, if found\n$ae->binunzip   # path to /bin/unzip, if found\n$ae->binbunzip2 # path to /bin/bunzip2 if found\n$ae->binunlzma  # path to /bin/unlzma if found\n$ae->binunxz    # path to /bin/unxz if found\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Archive::Extract is a generic archive extraction mechanism.\n\nIt allows you to extract any archive file of the type .tar, .tar.gz, .gz, .Z, tar.bz2, .tbz,\n.bz2, .zip, .xz,, .txz, .tar.xz or .lzma without having to worry how it does so, or use\ndifferent interfaces for each type by using either perl modules, or commandline tools on your\nsystem.\n\nSee the \"HOW IT WORKS\" section further down for details.\n",
                "subsections": []
            },
            "METHODS": {
                "content": "$ae = Archive::Extract->new(archive => '/path/to/archive',[type => TYPE])\nCreates a new \"Archive::Extract\" object based on the archive file you passed it. Automatically\ndetermines the type of archive based on the extension, but you can override that by explicitly\nproviding the \"type\" argument, potentially by calling \"typefor()\".\n\nValid values for \"type\" are:\n\ntar Standard tar files, as produced by, for example, \"/bin/tar\". Corresponds to a \".tar\" suffix.\n\ntgz Gzip compressed tar files, as produced by, for example \"/bin/tar -z\". Corresponds to a\n\".tgz\" or \".tar.gz\" suffix.\n\ngz  Gzip compressed file, as produced by, for example \"/bin/gzip\". Corresponds to a \".gz\"\nsuffix.\n\nZ   Lempel-Ziv compressed file, as produced by, for example \"/bin/compress\". Corresponds to a\n\".Z\" suffix.\n\nzip Zip compressed file, as produced by, for example \"/bin/zip\". Corresponds to a \".zip\", \".jar\"\nor \".par\" suffix.\n\nbz2 Bzip2 compressed file, as produced by, for example, \"/bin/bzip2\". Corresponds to a \".bz2\"\nsuffix.\n\ntbz Bzip2 compressed tar file, as produced by, for example \"/bin/tar -j\". Corresponds to a\n\".tbz\" or \".tar.bz2\" suffix.\n\nlzma\nLzma compressed file, as produced by \"/bin/lzma\". Corresponds to a \".lzma\" suffix.\n\nxz  Xz compressed file, as produced by \"/bin/xz\". Corresponds to a \".xz\" suffix.\n\ntxz Xz compressed tar file, as produced by, for example \"/bin/tar -J\". Corresponds to a \".txz\"\nor \".tar.xz\" suffix.\n\nReturns a \"Archive::Extract\" object on success, or false on failure.\n\n$ae->extract( [to => '/output/path'] )\nExtracts the archive represented by the \"Archive::Extract\" object to the path of your choice as\nspecified by the \"to\" argument. Defaults to \"cwd()\".\n\nSince \".gz\" files never hold a directory, but only a single file; if the \"to\" argument is an\nexisting directory, the file is extracted there, with its \".gz\" suffix stripped. If the \"to\"\nargument is not an existing directory, the \"to\" argument is understood to be a filename, if the\narchive type is \"gz\". In the case that you did not specify a \"to\" argument, the output file will\nbe the name of the archive file, stripped from its \".gz\" suffix, in the current working\ndirectory.\n\n\"extract\" will try a pure perl solution first, and then fall back to commandline tools if they\nare available. See the \"GLOBAL VARIABLES\" section below on how to alter this behaviour.\n\nIt will return true on success, and false on failure.\n\nOn success, it will also set the follow attributes in the object:\n\n$ae->extractpath\nThis is the directory that the files where extracted to.\n\n$ae->files\nThis is an array ref with the paths of all the files in the archive, relative to the \"to\"\nargument you specified. To get the full path to an extracted file, you would use:\n\nFile::Spec->catfile( $to, $ae->files->[0] );\n\nNote that all files from a tar archive will be in unix format, as per the tar specification.\n",
                "subsections": []
            },
            "ACCESSORS": {
                "content": "$ae->error([BOOL])\nReturns the last encountered error as string. Pass it a true value to get the \"Carp::longmess()\"\noutput instead.\n\n$ae->extractpath\nThis is the directory the archive got extracted to. See \"extract()\" for details.\n\n$ae->files\nThis is an array ref holding all the paths from the archive. See \"extract()\" for details.\n\n$ae->archive\nThis is the full path to the archive file represented by this \"Archive::Extract\" object.\n\n$ae->type\nThis is the type of archive represented by this \"Archive::Extract\" object. See accessors below\nfor an easier way to use this. See the \"new()\" method for details.\n\n$ae->types\nReturns a list of all known \"types\" for \"Archive::Extract\"'s \"new\" method.\n\n$ae->istgz\nReturns true if the file is of type \".tar.gz\". See the \"new()\" method for details.\n\n$ae->istar\nReturns true if the file is of type \".tar\". See the \"new()\" method for details.\n\n$ae->isgz\nReturns true if the file is of type \".gz\". See the \"new()\" method for details.\n\n$ae->isZ\nReturns true if the file is of type \".Z\". See the \"new()\" method for details.\n\n$ae->iszip\nReturns true if the file is of type \".zip\". See the \"new()\" method for details.\n\n$ae->islzma\nReturns true if the file is of type \".lzma\". See the \"new()\" method for details.\n\n$ae->isxz\nReturns true if the file is of type \".xz\". See the \"new()\" method for details.\n\n$ae->bintar\nReturns the full path to your tar binary, if found.\n\n$ae->bingzip\nReturns the full path to your gzip binary, if found\n\n$ae->binunzip\nReturns the full path to your unzip binary, if found\n\n$ae->binunlzma\nReturns the full path to your unlzma binary, if found\n\n$ae->binunxz\nReturns the full path to your unxz binary, if found\n\n$bool = $ae->haveoldbunzip2\nOlder versions of \"/bin/bunzip2\", from before the \"bunzip2 1.0\" release, require all archive\nnames to end in \".bz2\" or it will not extract them. This method checks if you have a recent\nversion of \"bunzip2\" that allows any extension, or an older one that doesn't.\n\ndebug( MESSAGE )\nThis method outputs MESSAGE to the default filehandle if $DEBUG is true. It's a small method,\nbut it's here if you'd like to subclass it so you can so something else with any debugging\noutput.\n",
                "subsections": []
            },
            "UTILITY FUNCTION": {
                "content": "typefor($archive)\nGiven an archive file name, it determins the type by parsing the file name extension. Used by\n\"new()\" when the \"type\" parameter is not passed. Also useful when the archive file does not\ninclude a suffix but the file name is otherwise known, such as when a file is uploaded to a web\nserver and stored with a temporary name that differs from the original name, and you want to use\nthe same detection pattern as Archive::Extract. Example:\n\nmy $ae = Archive::Extract->new(\narchive => '/tmp/02af6s',\ntype    => Archive::Extract::typefor('archive.zip'),\n);\n",
                "subsections": []
            },
            "HOW IT WORKS": {
                "content": "\"Archive::Extract\" tries first to determine what type of archive you are passing it, by\ninspecting its suffix. It does not do this by using Mime magic, or something related. See\n\"CAVEATS\" below.\n\nOnce it has determined the file type, it knows which extraction methods it can use on the\narchive. It will try a perl solution first, then fall back to a commandline tool if that fails.\nIf that also fails, it will return false, indicating it was unable to extract the archive. See\nthe section on \"GLOBAL VARIABLES\" to see how to alter this order.\n",
                "subsections": []
            },
            "CAVEATS": {
                "content": "",
                "subsections": [
                    {
                        "name": "File Extensions",
                        "content": "\"Archive::Extract\" trusts on the extension of the archive to determine what type it is, and what\nextractor methods therefore can be used. If your archives do not have any of the extensions as\ndescribed in the \"new()\" method, you will have to specify the type explicitly, or\n\"Archive::Extract\" will not be able to extract the archive for you.\n"
                    },
                    {
                        "name": "Supporting Very Large Files",
                        "content": "\"Archive::Extract\" can use either pure perl modules or command line programs under the hood.\nSome of the pure perl modules (like \"Archive::Tar\" and Compress::unLZMA) take the entire\ncontents of the archive into memory, which may not be feasible on your system. Consider setting\nthe global variable $Archive::Extract::PREFERBIN to 1, which will prefer the use of command\nline programs and won't consume so much memory.\n\nSee the \"GLOBAL VARIABLES\" section below for details.\n"
                    },
                    {
                        "name": "Bunzip2 support of arbitrary extensions.",
                        "content": "Older versions of \"/bin/bunzip2\" do not support arbitrary file extensions and insist on a \".bz2\"\nsuffix. Although we do our best to guard against this, if you experience a bunzip2 error, it may\nbe related to this. For details, please see the \"haveoldbunzip2\" method.\n"
                    }
                ]
            },
            "GLOBAL VARIABLES": {
                "content": "$Archive::Extract::DEBUG\nSet this variable to \"true\" to have all calls to command line tools be printed out, including\nall their output. This also enables \"Carp::longmess\" errors, instead of the regular \"carp\"\nerrors.\n\nGood for tracking down why things don't work with your particular setup.\n\nDefaults to \"false\".\n\n$Archive::Extract::WARN\nThis variable controls whether errors encountered internally by \"Archive::Extract\" should be\n\"carp\"'d or not.\n\nSet to false to silence warnings. Inspect the output of the \"error()\" method manually to see\nwhat went wrong.\n\nDefaults to \"true\".\n\n$Archive::Extract::PREFERBIN\nThis variables controls whether \"Archive::Extract\" should prefer the use of perl modules, or\ncommandline tools to extract archives.\n\nSet to \"true\" to have \"Archive::Extract\" prefer commandline tools.\n\nDefaults to \"false\".\n",
                "subsections": []
            },
            "TODO / CAVEATS": {
                "content": "Mime magic support\nMaybe this module should use something like \"File::Type\" to determine the type, rather than\nblindly trust the suffix.\n\nThread safety\nCurrently, \"Archive::Extract\" does a \"chdir\" to the extraction dir before extraction, and a\n\"chdir\" back again after. This is not necessarily thread safe. See \"rt.cpan.org\" bug\n\"#45671\" for details.\n",
                "subsections": []
            },
            "BUG REPORTS": {
                "content": "Please report bugs or other issues to <bug-archive-extract@rt.cpan.org>.\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "This module by Jos Boumans <kane@cpan.org>.\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "This library is free software; you may redistribute and/or modify it under the same terms as\nPerl itself.\n",
                "subsections": []
            }
        }
    }
}