Class::Discover - detect MooseX::Declare's 'class' keyword in files.
This class is designed primarily for tools that whish to populate the provides field of META.{yml,json} files so that the CPAN indexer will pay attention to the existance of your classes, rather than blithely ignoring them.
provides
The version parsing is basically the same as what M::I's ->version_form does, so should hopefully work as well as it does.
->version_form
Class::Discover->discover_classes(\%opts)
Takes a single options hash-ref, and returns a array-ref of hashes with the following format:
{ MyClass => { file => "lib/MtClass.pm", type => "class", version => "1" } }
version will only be present if the class has a (detected) version. type is the keyword match that triggered this class.
version
type
keyword
The following options are understood:
The (absolute) directory from which files should be given relative to. If files is not passed, then the dir under which to search for modules.
files
Array-ref of files in which to look. If provided, then only these files will be searched.
List of 'keywords' which are treated as being class declarators. Defaults to class and role.
class
role
A hash of arrays with keys of directory and file which are ignored when searching for packages.
directory
file
MooseX::Declare for the main reason for this module to exist.
Module::Install::ProvidesClass
Dist::Zilla
Ash Berlin <ash@cpan.org>. (C) 2009. All rights reserved.
<ash@cpan.org>
Licensed under the same terms as Perl itself.
To install Class::Discover, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Class::Discover
CPAN shell
perl -MCPAN -e shell install Class::Discover
For more information on module installation, please visit the detailed CPAN module installation guide.