No description or website provided.
Perl Perl6
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib/Dist/Zilla/Role
t
.gitignore
.travis.yml
Changes
LICENSE
README.mkdn
cpanfile
dist.ini

README.mkdn

NAME

Dist::Zilla::Role::EnsureStash - Ensure your plugin has access to a certain stash

VERSION

This document describes version 0.003 of Dist::Zilla::Role::EnsureStash - released April 11, 2015 as part of Dist-Zilla-Role-EnsureStash.

SYNOPSIS

package Dist::Zilla::Plugin::Something;

use Moose;
use namespace::autoclean;

with
    'Dist::Zilla::Plugin::BeforeRelease',
    'Dizt::Zilla::Role::EnsureStash',
    ;

sub our_stash_name  { '%ThatStash'                    }
sub our_stash_class { 'Dist::Zilla::Stash::ThatStash' }

sub before_release {
    my $self = shift @_;

    # returns '%ThatStash' if it exists, otherwise creates, registers,
    # then returns it
    my $stash = $self->our_stash;

    # profit!
}

DESCRIPTION

This is a Dist::Zilla role designed to ensure that if a plugin needs access to a stash, and that stash does not already exist, then it is automatically created and returned.

This is more intended for helping plugins that need to share common data do so via stashes, rather than specific information (e.g. PAUSE credentials and the like). As such, the stash instances created here are expected to largely be able to do their thing without much (preferably any) external input.

REQUIRED METHODS

our_stash_name

Just as it sounds; should return something Dist::Zilla will recognize as a stash name (e.g. %SomeStash).

our_stash_class

This is expected to return the class name of the class to be created and registered as our_stash_name() if a stash by that name does not exist.

It is expected to have consumed the Dist::Zilla::Role::Stash role.

SEE ALSO

Please see those modules/websites for more information related to this module.

SOURCE

The development version is on github at http://https://github.com/RsrchBoy/dist-zilla-role-ensurestash and may be cloned from git://https://github.com/RsrchBoy/dist-zilla-role-ensurestash.git

BUGS

Please report any bugs or feature requests on the bugtracker website https://github.com/RsrchBoy/dist-zilla-role-ensurestash/issues

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

AUTHOR

Chris Weyl cweyl@alumni.drew.edu

I'm a material boy in a material world

Please note I do not expect to be gittip'ed or flattr'ed for this work, rather it is simply a very pleasant surprise. I largely create and release works like this because I need them or I find it enjoyable; however, don't let that stop you if you feel like it ;)

Flattr this, gittip me, or indulge my Amazon Wishlist... If you so desire.

COPYRIGHT AND LICENSE

This software is Copyright (c) 2012 by Chris Weyl.

This is free software, licensed under:

The GNU Lesser General Public License, Version 2.1, February 1999