{
    "mode": "perldoc",
    "parameter": "File::Share",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/File%3A%3AShare/json",
    "generated": "2026-06-12T10:04:46Z",
    "synopsis": "use File::Share ':all';\nmy $dir = distdir('Foo-Bar');\nmy $file = distfile('Foo-Bar', 'file.txt');",
    "sections": {
        "NAME": {
            "content": "File::Share - Extend File::ShareDir to Local Libraries\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use File::Share ':all';\n\nmy $dir = distdir('Foo-Bar');\nmy $file = distfile('Foo-Bar', 'file.txt');\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This module is a dropin replacement for File::ShareDir. It supports the \"distdir\" and\n\"distfile\" functions, except these functions have been enhanced to understand when the\ndeveloper's local \"./share/\" directory should be used.\n\nNOTE: moduledist and modulefile are not yet supported, because (afaik) there is no well known\nway to populate per-module share files. This may change in the future. Please contact me if you\nknow how to do this.\n",
            "subsections": []
        },
        "PROBLEM AND SOLUTION": {
            "content": "Module::Install has an \"installshare\" directive that allows you to install various files\nassociated with a distribution. By convention, module authors always put these in a directory\ncalled \"share/\". However, File::ShareDir can only find files after they have been installed.\nThis can be problematic when running development tests.\n\nFile::Share will look for a local \"share\" directory, if it notices that the module corresponding\nwas loaded from a development path.\n\nDevel::Local gives you an easy way to use a bunch of source repositories as though their lib and\nbin directories had already been installed. \"File::Share\" lets you play along with that.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "*   File::ShareDir\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Ingy döt Net <ingy@cpan.org>\n",
            "subsections": []
        },
        "COPYRIGHT AND LICENSE": {
            "content": "Copyright 2011-2014. Ingy döt Net.\n\nThis program is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself.\n\nSee <http://www.perl.com/perl/misc/Artistic.html>\n",
            "subsections": []
        }
    },
    "summary": "File::Share - Extend File::ShareDir to Local Libraries",
    "flags": [],
    "examples": [],
    "see_also": []
}