NAME

Module::New::Context

SYNOPSIS

my $context = Module::New->context;
my $value = $context->config('foo');
my $distribution = $context->distname;  # Some-Distribution-Name
$context->module('Some::Module::Name');

DESCRIPTION

This is used to hold various information on a distribution/module.

METHODS

new

creates an object.

config

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).

license

takes a license name and returns a license text (perl license by default).

distname

holds a distribution name you passed to the command.

module

holds a main module name you passed to the command (or the one converted from a distribution name).

mainfile

holds a main module file path.

maindir

holds a main module directory path.

AUTHOR

Kenichi Ishigaki, <ishigaki@cpan.org>

COPYRIGHT AND LICENSE

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.