{
    "content": [
        {
            "type": "text",
            "text": "# Module::Pluggable (perldoc)\n\n**Summary:** Module::Pluggable - automatically give your module the ability to have plugins\n\n**Synopsis:** Simple use Module::Pluggable -\npackage MyClass;\nuse Module::Pluggable;\nand then later ...\nuse MyClass;\nmy $mc = MyClass->new();\n# returns the names of all plugins installed under MyClass::Plugin::*\nmy @plugins = $mc->plugins();\n\n## Examples\n\n- `Why would you want to do this? Say you have something that wants to pass an object to a number`\n- `of different plugins in turn. For example you may want to extract meta-data from every email you`\n- `get sent and do something with it. Plugins make sense here because then you can keep adding new`\n- `meta data parsers and all the logic and docs for each one will be self contained and new`\n- `handlers are easy to add without changing the core code. For that, you might do something like`\n- `...`\n- `package Email::Examiner;`\n- `use strict;`\n- `use Email::Simple;`\n- `use Module::Pluggable require => 1;`\n- `sub handleemail {`\n- `my $self  = shift;`\n- `my $email = shift;`\n- `foreach my $plugin ($self->plugins) {`\n- `$plugin->examine($email);`\n- `return 1;`\n- `.. and all the plugins will get a chance in turn to look at it.`\n- `This can be trivially extended so that plugins could save the email somewhere and then no other`\n- `plugin should try and do that. Simply have it so that the \"examine\" method returns 1 if it has`\n- `saved the email somewhere. You might also want to be paranoid and check to see if the plugin has`\n- `an \"examine\" method.`\n- `foreach my $plugin ($self->plugins) {`\n- `next unless $plugin->can('examine');`\n- `last if     $plugin->examine($email);`\n- `And so on. The sky's the limit.`\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (12 lines)\n- **EXAMPLE** (38 lines)\n- **DESCRIPTION** (8 lines)\n- **ADVANCED USAGE** (68 lines)\n- **PLUGIN SEARCHING** (12 lines)\n- **INNER PACKAGES** (5 lines)\n- **OPTIONS** (73 lines)\n- **TRIGGERS** (36 lines)\n- **BEHAVIOUR UNDER TEST ENVIRONMENT** (29 lines)\n- **Module::Require recommended** (7 lines)\n- **FUTURE PLANS** (5 lines)\n- **DEVELOPMENT** (4 lines)\n- **AUTHOR** (2 lines)\n- **COPYING** (4 lines)\n- **BUGS** (2 lines)\n- **SEE ALSO** (2 lines)\n\n## Full Content\n\n### NAME\n\nModule::Pluggable - automatically give your module the ability to have plugins\n\n### SYNOPSIS\n\nSimple use Module::Pluggable -\n\npackage MyClass;\nuse Module::Pluggable;\n\nand then later ...\n\nuse MyClass;\nmy $mc = MyClass->new();\n# returns the names of all plugins installed under MyClass::Plugin::*\nmy @plugins = $mc->plugins();\n\n### EXAMPLE\n\nWhy would you want to do this? Say you have something that wants to pass an object to a number\nof different plugins in turn. For example you may want to extract meta-data from every email you\nget sent and do something with it. Plugins make sense here because then you can keep adding new\nmeta data parsers and all the logic and docs for each one will be self contained and new\nhandlers are easy to add without changing the core code. For that, you might do something like\n...\n\npackage Email::Examiner;\n\nuse strict;\nuse Email::Simple;\nuse Module::Pluggable require => 1;\n\nsub handleemail {\nmy $self  = shift;\nmy $email = shift;\n\nforeach my $plugin ($self->plugins) {\n$plugin->examine($email);\n}\n\nreturn 1;\n}\n\n.. and all the plugins will get a chance in turn to look at it.\n\nThis can be trivially extended so that plugins could save the email somewhere and then no other\nplugin should try and do that. Simply have it so that the \"examine\" method returns 1 if it has\nsaved the email somewhere. You might also want to be paranoid and check to see if the plugin has\nan \"examine\" method.\n\nforeach my $plugin ($self->plugins) {\nnext unless $plugin->can('examine');\nlast if     $plugin->examine($email);\n}\n\nAnd so on. The sky's the limit.\n\n### DESCRIPTION\n\nProvides a simple but, hopefully, extensible way of having 'plugins' for your module. Obviously\nthis isn't going to be the be all and end all of solutions but it works for me.\n\nEssentially all it does is export a method into your namespace that looks through a search path\nfor .pm files and turn those into class names.\n\nOptionally it instantiates those classes for you.\n\n### ADVANCED USAGE\n\nAlternatively, if you don't want to use 'plugins' as the method ...\n\npackage MyClass;\nuse Module::Pluggable subname => 'foo';\n\nand then later ...\n\nmy @plugins = $mc->foo();\n\nOr if you want to look in another namespace\n\npackage MyClass;\nuse Module::Pluggable searchpath => ['Acme::MyClass::Plugin', 'MyClass::Extend'];\n\nor directory\n\nuse Module::Pluggable searchdirs => ['mylibs/Foo'];\n\nOr if you want to instantiate each plugin rather than just return the name\n\npackage MyClass;\nuse Module::Pluggable instantiate => 'new';\n\nand then\n\n# whatever is passed to 'plugins' will be passed\n# to 'new' for each plugin\nmy @plugins = $mc->plugins(@options);\n\nalternatively you can just require the module without instantiating it\n\npackage MyClass;\nuse Module::Pluggable require => 1;\n\nsince requiring automatically searches inner packages, which may not be desirable, you can turn\nthis off\n\npackage MyClass;\nuse Module::Pluggable require => 1, inner => 0;\n\nYou can limit the plugins loaded using the except option, either as a string, array ref or regex\n\npackage MyClass;\nuse Module::Pluggable except => 'MyClass::Plugin::Foo';\n\nor\n\npackage MyClass;\nuse Module::Pluggable except => ['MyClass::Plugin::Foo', 'MyClass::Plugin::Bar'];\n\nor\n\npackage MyClass;\nuse Module::Pluggable except => qr/^MyClass::Plugin::(Foo|Bar)$/;\n\nand similarly for only which will only load plugins which match.\n\nRemember you can use the module more than once\n\npackage MyClass;\nuse Module::Pluggable searchpath => 'MyClass::Filters' subname => 'filters';\nuse Module::Pluggable searchpath => 'MyClass::Plugins' subname => 'plugins';\n\nand then later ...\n\nmy @filters = $self->filters;\nmy @plugins = $self->plugins;\n\n### PLUGIN SEARCHING\n\nEvery time you call 'plugins' the whole search path is walked again. This allows for dynamically\nloading plugins even at run time. However this can get expensive and so if you don't expect to\nwant to add new plugins at run time you could do\n\npackage Foo;\nuse strict;\nuse Module::Pluggable subname => 'plugins';\n\nour @PLUGINS;\nsub plugins { @PLUGINS ||= shift->plugins }\n1;\n\n### INNER PACKAGES\n\nIf you have, for example, a file lib/Something/Plugin/Foo.pm that contains package definitions\nfor both \"Something::Plugin::Foo\" and \"Something::Plugin::Bar\" then as long as you either have\neither the require or instantiate option set then we'll also find \"Something::Plugin::Bar\".\nNifty!\n\n### OPTIONS\n\nYou can pass a hash of options when importing this module.\n\nThe options can be ...\n\nsubname\nThe name of the subroutine to create in your namespace.\n\nBy default this is 'plugins'\n\nsearchpath\nAn array ref of namespaces to look in.\n\nsearchdirs\nAn array ref of directories to look in before @INC.\n\ninstantiate\nCall this method on the class. In general this will probably be 'new' but it can be whatever you\nwant. Whatever arguments are passed to 'plugins' will be passed to the method.\n\nThe default is 'undef' i.e just return the class name.\n\nrequire\nJust require the class, don't instantiate (overrides 'instantiate');\n\ninner\nIf set to 0 will not search inner packages. If set to 1 will override \"require\".\n\nonly\nTakes a string, array ref or regex describing the names of the only plugins to return. Whilst\nthis may seem perverse ... well, it is. But it also makes sense. Trust me.\n\nexcept\nSimilar to \"only\" it takes a description of plugins to exclude from returning. This is slightly\nless perverse.\n\npackage\nThis is for use by extension modules which build on \"Module::Pluggable\": passing a \"package\"\noption allows you to place the plugin method in a different package other than your own.\n\nfileregex\nBy default \"Module::Pluggable\" only looks for *.pm* files.\n\nBy supplying a new \"fileregex\" then you can change this behaviour e.g\n\nfileregex => qr/\\.plugin$/\n\nincludeeditorjunk\nBy default \"Module::Pluggable\" ignores files that look like they were left behind by editors.\nCurrently this means files ending in ~ (~), the extensions .swp or .swo, or files beginning with\n.#.\n\nSetting \"includeeditorjunk\" changes \"Module::Pluggable\" so it does not ignore any files it\nfinds.\n\nfollowsymlinks\nWhether, when searching directories, to follow symlinks.\n\nDefaults to 1 i.e do follow symlinks.\n\nmindepth, maxdepth\nThis will allow you to set what 'depth' of plugin will be allowed.\n\nSo, for example, \"MyClass::Plugin::Foo\" will have a depth of 3 and \"MyClass::Plugin::Foo::Bar\"\nwill have a depth of 4 so to only get the former (i.e \"MyClass::Plugin::Foo\") do\n\npackage MyClass;\nuse Module::Pluggable maxdepth => 3;\n\nand to only get the latter (i.e \"MyClass::Plugin::Foo::Bar\")\n\npackage MyClass;\nuse Module::Pluggable mindepth => 4;\n\n### TRIGGERS\n\nVarious triggers can also be passed in to the options.\n\nIf any of these triggers return 0 then the plugin will not be returned.\n\nbeforerequire <plugin>\nGets passed the plugin name.\n\nIf 0 is returned then this plugin will not be required either.\n\nonrequireerror <plugin> <err>\nGets called when there's an error on requiring the plugin.\n\nGets passed the plugin name and the error.\n\nThe default onrequireerror handler is to \"carp\" the error and return 0.\n\noninstantiateerror <plugin> <err>\nGets called when there's an error on instantiating the plugin.\n\nGets passed the plugin name and the error.\n\nThe default oninstantiateerror handler is to \"carp\" the error and return 0.\n\nafterrequire <plugin>\nGets passed the plugin name.\n\nIf 0 is returned then this plugin will be required but not returned as a plugin.\n\nMETHODs\nsearchpath\nThe method \"searchpath\" is exported into you namespace as well. You can call that at any time\nto change or replace the searchpath.\n\n$self->searchpath( add => \"New::Path\" ); # add\n$self->searchpath( new => \"New::Path\" ); # replace\n\n### BEHAVIOUR UNDER TEST ENVIRONMENT\n\nIn order to make testing reliable we exclude anything not from blib if blib.pm is in %INC.\n\nHowever if the module being tested used another module that itself used \"Module::Pluggable\" then\nthe second module would fail. This was fixed by checking to see if the caller had (^|/)blib/ in\ntheir filename.\n\nThere's an argument that this is the wrong behaviour and that modules should explicitly trigger\nthis behaviour but that particular code has been around for 7 years now and I'm reluctant to\nchange the default behaviour.\n\nYou can now (as of version 4.1) force Module::Pluggable to look outside blib in a test\nenvironment by doing either\n\nrequire Module::Pluggable;\n$Module::Pluggable::FORCESEARCHALLPATHS = 1;\nimport Module::Pluggable;\n\nor\n\nuse Module::Pluggable forcesearchallpaths => 1;\n\n@INC hooks and App::FatPacker\nIf a module's @INC has a hook and that hook is an object which has a \"files()\" method then we\nwill try and require those files too. See \"t/26inchook.t\" for an example.\n\nThis has allowed App::FatPacker (as of version 0.10.0) to provide support for Module::Pluggable.\n\nThis should also, theoretically, allow someone to modify PAR to do the same thing.\n\n### Module::Require recommended\n\nUp until version 5.2 Module::Pluggable used a string \"eval\" to require plugins.\n\nThis has now been changed to optionally use Module::Runtime and it's \"requiremodule\" method\nwhen available and fall back to using a path based \"require\" when not.\n\nIt's recommended, but not required, that you install Module::Runtime.\n\n### FUTURE PLANS\n\nThis does everything I need and I can't really think of any other features I want to add. Famous\nlast words of course (not least because we're up to version 5.0 at the time of writing).\n\nHowever suggestions (and patches) are always welcome.\n\n### DEVELOPMENT\n\nThe master repo for this module is at\n\nhttps://github.com/simonwistow/Module-Pluggable\n\n### AUTHOR\n\nSimon Wistow <simon@thegestalt.org>\n\n### COPYING\n\nCopyright, 2006 Simon Wistow\n\nDistributed under the same terms as Perl itself.\n\n### BUGS\n\nNone known.\n\n### SEE ALSO\n\nFile::Spec, File::Find, File::Basename, Class::Factory::Util, Module::Pluggable::Ordered\n\n"
        }
    ],
    "structuredContent": {
        "command": "Module::Pluggable",
        "section": "",
        "mode": "perldoc",
        "summary": "Module::Pluggable - automatically give your module the ability to have plugins",
        "synopsis": "Simple use Module::Pluggable -\npackage MyClass;\nuse Module::Pluggable;\nand then later ...\nuse MyClass;\nmy $mc = MyClass->new();\n# returns the names of all plugins installed under MyClass::Plugin::*\nmy @plugins = $mc->plugins();",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [
            "Why would you want to do this? Say you have something that wants to pass an object to a number",
            "of different plugins in turn. For example you may want to extract meta-data from every email you",
            "get sent and do something with it. Plugins make sense here because then you can keep adding new",
            "meta data parsers and all the logic and docs for each one will be self contained and new",
            "handlers are easy to add without changing the core code. For that, you might do something like",
            "...",
            "package Email::Examiner;",
            "use strict;",
            "use Email::Simple;",
            "use Module::Pluggable require => 1;",
            "sub handleemail {",
            "my $self  = shift;",
            "my $email = shift;",
            "foreach my $plugin ($self->plugins) {",
            "$plugin->examine($email);",
            "return 1;",
            ".. and all the plugins will get a chance in turn to look at it.",
            "This can be trivially extended so that plugins could save the email somewhere and then no other",
            "plugin should try and do that. Simply have it so that the \"examine\" method returns 1 if it has",
            "saved the email somewhere. You might also want to be paranoid and check to see if the plugin has",
            "an \"examine\" method.",
            "foreach my $plugin ($self->plugins) {",
            "next unless $plugin->can('examine');",
            "last if     $plugin->examine($email);",
            "And so on. The sky's the limit."
        ],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 12,
                "subsections": []
            },
            {
                "name": "EXAMPLE",
                "lines": 38,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "ADVANCED USAGE",
                "lines": 68,
                "subsections": []
            },
            {
                "name": "PLUGIN SEARCHING",
                "lines": 12,
                "subsections": []
            },
            {
                "name": "INNER PACKAGES",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 73,
                "subsections": []
            },
            {
                "name": "TRIGGERS",
                "lines": 36,
                "subsections": []
            },
            {
                "name": "BEHAVIOUR UNDER TEST ENVIRONMENT",
                "lines": 29,
                "subsections": []
            },
            {
                "name": "Module::Require recommended",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "FUTURE PLANS",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "DEVELOPMENT",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "COPYING",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "BUGS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Module::Pluggable - automatically give your module the ability to have plugins\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "Simple use Module::Pluggable -\n\npackage MyClass;\nuse Module::Pluggable;\n\nand then later ...\n\nuse MyClass;\nmy $mc = MyClass->new();\n# returns the names of all plugins installed under MyClass::Plugin::*\nmy @plugins = $mc->plugins();\n",
                "subsections": []
            },
            "EXAMPLE": {
                "content": "Why would you want to do this? Say you have something that wants to pass an object to a number\nof different plugins in turn. For example you may want to extract meta-data from every email you\nget sent and do something with it. Plugins make sense here because then you can keep adding new\nmeta data parsers and all the logic and docs for each one will be self contained and new\nhandlers are easy to add without changing the core code. For that, you might do something like\n...\n\npackage Email::Examiner;\n\nuse strict;\nuse Email::Simple;\nuse Module::Pluggable require => 1;\n\nsub handleemail {\nmy $self  = shift;\nmy $email = shift;\n\nforeach my $plugin ($self->plugins) {\n$plugin->examine($email);\n}\n\nreturn 1;\n}\n\n.. and all the plugins will get a chance in turn to look at it.\n\nThis can be trivially extended so that plugins could save the email somewhere and then no other\nplugin should try and do that. Simply have it so that the \"examine\" method returns 1 if it has\nsaved the email somewhere. You might also want to be paranoid and check to see if the plugin has\nan \"examine\" method.\n\nforeach my $plugin ($self->plugins) {\nnext unless $plugin->can('examine');\nlast if     $plugin->examine($email);\n}\n\nAnd so on. The sky's the limit.\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Provides a simple but, hopefully, extensible way of having 'plugins' for your module. Obviously\nthis isn't going to be the be all and end all of solutions but it works for me.\n\nEssentially all it does is export a method into your namespace that looks through a search path\nfor .pm files and turn those into class names.\n\nOptionally it instantiates those classes for you.\n",
                "subsections": []
            },
            "ADVANCED USAGE": {
                "content": "Alternatively, if you don't want to use 'plugins' as the method ...\n\npackage MyClass;\nuse Module::Pluggable subname => 'foo';\n\nand then later ...\n\nmy @plugins = $mc->foo();\n\nOr if you want to look in another namespace\n\npackage MyClass;\nuse Module::Pluggable searchpath => ['Acme::MyClass::Plugin', 'MyClass::Extend'];\n\nor directory\n\nuse Module::Pluggable searchdirs => ['mylibs/Foo'];\n\nOr if you want to instantiate each plugin rather than just return the name\n\npackage MyClass;\nuse Module::Pluggable instantiate => 'new';\n\nand then\n\n# whatever is passed to 'plugins' will be passed\n# to 'new' for each plugin\nmy @plugins = $mc->plugins(@options);\n\nalternatively you can just require the module without instantiating it\n\npackage MyClass;\nuse Module::Pluggable require => 1;\n\nsince requiring automatically searches inner packages, which may not be desirable, you can turn\nthis off\n\npackage MyClass;\nuse Module::Pluggable require => 1, inner => 0;\n\nYou can limit the plugins loaded using the except option, either as a string, array ref or regex\n\npackage MyClass;\nuse Module::Pluggable except => 'MyClass::Plugin::Foo';\n\nor\n\npackage MyClass;\nuse Module::Pluggable except => ['MyClass::Plugin::Foo', 'MyClass::Plugin::Bar'];\n\nor\n\npackage MyClass;\nuse Module::Pluggable except => qr/^MyClass::Plugin::(Foo|Bar)$/;\n\nand similarly for only which will only load plugins which match.\n\nRemember you can use the module more than once\n\npackage MyClass;\nuse Module::Pluggable searchpath => 'MyClass::Filters' subname => 'filters';\nuse Module::Pluggable searchpath => 'MyClass::Plugins' subname => 'plugins';\n\nand then later ...\n\nmy @filters = $self->filters;\nmy @plugins = $self->plugins;\n",
                "subsections": []
            },
            "PLUGIN SEARCHING": {
                "content": "Every time you call 'plugins' the whole search path is walked again. This allows for dynamically\nloading plugins even at run time. However this can get expensive and so if you don't expect to\nwant to add new plugins at run time you could do\n\npackage Foo;\nuse strict;\nuse Module::Pluggable subname => 'plugins';\n\nour @PLUGINS;\nsub plugins { @PLUGINS ||= shift->plugins }\n1;\n",
                "subsections": []
            },
            "INNER PACKAGES": {
                "content": "If you have, for example, a file lib/Something/Plugin/Foo.pm that contains package definitions\nfor both \"Something::Plugin::Foo\" and \"Something::Plugin::Bar\" then as long as you either have\neither the require or instantiate option set then we'll also find \"Something::Plugin::Bar\".\nNifty!\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "You can pass a hash of options when importing this module.\n\nThe options can be ...\n\nsubname\nThe name of the subroutine to create in your namespace.\n\nBy default this is 'plugins'\n\nsearchpath\nAn array ref of namespaces to look in.\n\nsearchdirs\nAn array ref of directories to look in before @INC.\n\ninstantiate\nCall this method on the class. In general this will probably be 'new' but it can be whatever you\nwant. Whatever arguments are passed to 'plugins' will be passed to the method.\n\nThe default is 'undef' i.e just return the class name.\n\nrequire\nJust require the class, don't instantiate (overrides 'instantiate');\n\ninner\nIf set to 0 will not search inner packages. If set to 1 will override \"require\".\n\nonly\nTakes a string, array ref or regex describing the names of the only plugins to return. Whilst\nthis may seem perverse ... well, it is. But it also makes sense. Trust me.\n\nexcept\nSimilar to \"only\" it takes a description of plugins to exclude from returning. This is slightly\nless perverse.\n\npackage\nThis is for use by extension modules which build on \"Module::Pluggable\": passing a \"package\"\noption allows you to place the plugin method in a different package other than your own.\n\nfileregex\nBy default \"Module::Pluggable\" only looks for *.pm* files.\n\nBy supplying a new \"fileregex\" then you can change this behaviour e.g\n\nfileregex => qr/\\.plugin$/\n\nincludeeditorjunk\nBy default \"Module::Pluggable\" ignores files that look like they were left behind by editors.\nCurrently this means files ending in ~ (~), the extensions .swp or .swo, or files beginning with\n.#.\n\nSetting \"includeeditorjunk\" changes \"Module::Pluggable\" so it does not ignore any files it\nfinds.\n\nfollowsymlinks\nWhether, when searching directories, to follow symlinks.\n\nDefaults to 1 i.e do follow symlinks.\n\nmindepth, maxdepth\nThis will allow you to set what 'depth' of plugin will be allowed.\n\nSo, for example, \"MyClass::Plugin::Foo\" will have a depth of 3 and \"MyClass::Plugin::Foo::Bar\"\nwill have a depth of 4 so to only get the former (i.e \"MyClass::Plugin::Foo\") do\n\npackage MyClass;\nuse Module::Pluggable maxdepth => 3;\n\nand to only get the latter (i.e \"MyClass::Plugin::Foo::Bar\")\n\npackage MyClass;\nuse Module::Pluggable mindepth => 4;\n",
                "subsections": []
            },
            "TRIGGERS": {
                "content": "Various triggers can also be passed in to the options.\n\nIf any of these triggers return 0 then the plugin will not be returned.\n\nbeforerequire <plugin>\nGets passed the plugin name.\n\nIf 0 is returned then this plugin will not be required either.\n\nonrequireerror <plugin> <err>\nGets called when there's an error on requiring the plugin.\n\nGets passed the plugin name and the error.\n\nThe default onrequireerror handler is to \"carp\" the error and return 0.\n\noninstantiateerror <plugin> <err>\nGets called when there's an error on instantiating the plugin.\n\nGets passed the plugin name and the error.\n\nThe default oninstantiateerror handler is to \"carp\" the error and return 0.\n\nafterrequire <plugin>\nGets passed the plugin name.\n\nIf 0 is returned then this plugin will be required but not returned as a plugin.\n\nMETHODs\nsearchpath\nThe method \"searchpath\" is exported into you namespace as well. You can call that at any time\nto change or replace the searchpath.\n\n$self->searchpath( add => \"New::Path\" ); # add\n$self->searchpath( new => \"New::Path\" ); # replace\n",
                "subsections": []
            },
            "BEHAVIOUR UNDER TEST ENVIRONMENT": {
                "content": "In order to make testing reliable we exclude anything not from blib if blib.pm is in %INC.\n\nHowever if the module being tested used another module that itself used \"Module::Pluggable\" then\nthe second module would fail. This was fixed by checking to see if the caller had (^|/)blib/ in\ntheir filename.\n\nThere's an argument that this is the wrong behaviour and that modules should explicitly trigger\nthis behaviour but that particular code has been around for 7 years now and I'm reluctant to\nchange the default behaviour.\n\nYou can now (as of version 4.1) force Module::Pluggable to look outside blib in a test\nenvironment by doing either\n\nrequire Module::Pluggable;\n$Module::Pluggable::FORCESEARCHALLPATHS = 1;\nimport Module::Pluggable;\n\nor\n\nuse Module::Pluggable forcesearchallpaths => 1;\n\n@INC hooks and App::FatPacker\nIf a module's @INC has a hook and that hook is an object which has a \"files()\" method then we\nwill try and require those files too. See \"t/26inchook.t\" for an example.\n\nThis has allowed App::FatPacker (as of version 0.10.0) to provide support for Module::Pluggable.\n\nThis should also, theoretically, allow someone to modify PAR to do the same thing.\n",
                "subsections": []
            },
            "Module::Require recommended": {
                "content": "Up until version 5.2 Module::Pluggable used a string \"eval\" to require plugins.\n\nThis has now been changed to optionally use Module::Runtime and it's \"requiremodule\" method\nwhen available and fall back to using a path based \"require\" when not.\n\nIt's recommended, but not required, that you install Module::Runtime.\n",
                "subsections": []
            },
            "FUTURE PLANS": {
                "content": "This does everything I need and I can't really think of any other features I want to add. Famous\nlast words of course (not least because we're up to version 5.0 at the time of writing).\n\nHowever suggestions (and patches) are always welcome.\n",
                "subsections": []
            },
            "DEVELOPMENT": {
                "content": "The master repo for this module is at\n\nhttps://github.com/simonwistow/Module-Pluggable\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Simon Wistow <simon@thegestalt.org>\n",
                "subsections": []
            },
            "COPYING": {
                "content": "Copyright, 2006 Simon Wistow\n\nDistributed under the same terms as Perl itself.\n",
                "subsections": []
            },
            "BUGS": {
                "content": "None known.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "File::Spec, File::Find, File::Basename, Class::Factory::Util, Module::Pluggable::Ordered\n",
                "subsections": []
            }
        }
    }
}