The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Dist::Zilla::Plugin::Author::KENTNL::Prereqs::Latest::Selective - Selectively upgrade a few modules to depend on the version used.

VERSION

version 0.1.0

SYNOPSIS

        [Autoprereqs]

        [Author::KENTNL::Prereqs::Latest::Selective]

This will automatically upgrade the minimum required version to the currently running version, for a selective list of packages, wherever they appear in dependencies.

Currently, the list of packages that will be upgraded to the current version are as follows:

  • Test::More - What I test all my packages with

  • Module::Build - The Installer I use for everything

  • Dist::Zilla::PluginBundle::Author::KENTNL - The config setup I use for everything.

METHODS

wanted_latest

        my $hash = $plugin->wanted_latest();

A Hashmap of Modules I want to be "Latest I've released with"

        {
                'Test::More' => 1,
                'Module::Build' => 1,
                'Dist::Zilla::PluginBundle::Author::KENTNL' => 1,
        }

current_version_of

        my $v = $plugin->current_version_of('Foo');

Returns the currently installed version of a given thing.

for_each_dependency

        $plugin->for_each_dependency( $cpan_meta, sub {
                my ( $self, $info ) = @_;

                printf "%s => %s\n", $_ , $info->{$_} for qw( phase type package requirement )
        });

Utility for iterating all dependency specifications.

Each dependency spec is passed as a hashref

        {
                phase => 'configure',
                type  => 'requires',
                package => 'Module::Metadata',
                requirement => bless({}, 'CPAN::Meta::Requirements::_Range::_Range'); # or close.
        }

AUTHOR

Kent Fredric <kentfredric@gmail.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2012 by Kent Fredric <kentfredric@gmail.com>.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.