NAME

My::Module::Meta - Information needed to build Astro::SpaceTrack

SYNOPSIS

use lib qw{ inc };
use My::Module::Meta;
my $meta = My::Module::Meta->new();
use JSON;
print "Required modules:\n", to_json(
    $meta->requires(), { pretty => 1 } );

DETAILS

This module centralizes information needed to build App::Satpass2. It is private to the App::Satpass2 package, and may be changed or retracted without notice.

METHODS

This class supports the following public methods:

new

use lib qw{ inc };
my $meta = My::Module::Meta->new();

This method instantiates the class.

build_requires

use JSON;
print to_json( $meta->build_requires(), { pretty => 1 } );

This method computes and returns a reference to a hash describing the modules required to build the Astro::Coord::ECI package, suitable for use in a Build.PL build_requires key, or a Makefile.PL {META_MERGE}->{build_requires} key.

distribution

if ( $meta->distribution() ) {
    print "Making distribution\n";
} else {
    print "Not making distribution\n";
}

This method returns the value of the environment variable MAKING_MODULE_DISTRIBUTION at the time the object was instantiated.

notice

my @exes = $meta->notice( \%opt, \&prompter );

This method prints a notice before building. It returns a list of executables to build.

The arguments are the options hash returned by the build system, and a reference to a prompt routine. This reference is given the prompt and the default answer, and the correct argument depends on your build system; for ExtUtils::MakeMaker it is \&prompt; for Module::Build it needs to be sub { return $bldr->prompt( @_ ) }, where $bldr is the Module::Build object.

The above are general remarks.

In this incarnation, the method determines which executables are to be installed.

requires

use JSON;
print to_json( $meta->requires(), { pretty => 1 } );

This method computes and returns a reference to a hash describing the modules required to run the App::Satpass2 package, suitable for use in a Build.PL requires key, or a Makefile.PL PREREQ_PM key. Any additional arguments will be appended to the generated hash. In addition, unless distribution() is true, configuration-specific modules may be added.

requires_perl

print 'This package requires Perl ', $meta->requires_perl(), "\n";

This method returns the version of Perl required by the package.

ATTRIBUTES

This class has no public attributes.

ENVIRONMENT

MAKING_MODULE_DISTRIBUTION

This environment variable should be set to a true value if you are making a distribution. This ensures that no configuration-specific information makes it into META.yml.

SUPPORT

Support is by the author. Please file bug reports at http://rt.cpan.org, or in electronic mail to the author.

AUTHOR

Thomas R. Wyant, III wyant at cpan dot org

COPYRIGHT AND LICENSE

Copyright (C) 2010-2013 by Thomas R. Wyant, III

This program is free software; you can redistribute it and/or modify it under the same terms as Perl 5.10.0. For more details, see the full text of the licenses in the directory LICENSES.

This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.