Module::New::Context
my $context = Module::New->context; my $value = $context->config('foo'); my $distribution = $context->distname; # Some-Distribution-Name $context->module('Some::Module::Name');
This is used to hold various information on a distribution/module.
creates an object.
returns a ::Config object if there's no argument, and returns an appropriate config value with an argument. If you pass more arguments, you can update the configuration temporarily (if you want to keep the values permanently, use ->config->save(@_) instead).
->config->save(@_)
takes a license name and returns a license text (perl license by default).
holds a distribution name you passed to the command.
holds a distribution id, which is the lowercased distribution name, replaced hyphens with underscores.
holds a main module name you passed to the command (or the one converted from a distribution name).
holds a main module file path.
holds a main module directory path.
holds a main module id, which is the lowercased module name, replaced double colons with underscores.
holds a main module directory path, without prepending "lib".
holds a basename of the main module, without ".pm".
holds a repository url.
Kenichi Ishigaki, <ishigaki@cpan.org>
Copyright (C) 2007-2009 by Kenichi Ishigaki.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Module::New, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Module::New
CPAN shell
perl -MCPAN -e shell install Module::New
For more information on module installation, please visit the detailed CPAN module installation guide.