Permalink
Browse files

LICENSE and README.pod are more useful when committed :)

  • Loading branch information...
1 parent b143c5e commit 2154c1043a4947224b6ac346fc970848ee7de36d @RsrchBoy committed Dec 22, 2012
Showing with 629 additions and 1 deletion.
  1. +541 −1 LICENSE
  2. +88 −0 README.pod
View
Oops, something went wrong.
View
@@ -0,0 +1,88 @@
+=pod
+
+=encoding utf-8
+
+=for :stopwords Chris Weyl
+
+=head1 NAME
+
+Dist::Zilla::Role::EnsureStash - Ensure your plugin has access to a certain stash
+
+=head1 VERSION
+
+This document describes version 0.001 of Dist::Zilla::Role::EnsureStash - released December 22, 2012 as part of Dist-Zilla-Role-EnsureStash.
+
+=head1 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!
+ }
+
+=head1 DESCRIPTION
+
+This is a L<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.
+
+=head1 REQUIRED METHODS
+
+=head2 our_stash_name
+
+Just as it sounds; should return something Dist::Zilla will recognize as a
+stash name (e.g. C<%SomeStash>).
+
+=head2 our_stash_class
+
+This is expected to return the class name of the class to be created and
+registered as C<our_stash_name()> if a stash by that name does not exist.
+
+It is expected to have consumed the L<Dist::Zilla::Role::Stash> role.
+
+=head1 SEE ALSO
+
+Please see those modules/websites for more information related to this module.
+
+=over 4
+
+=item *
+
+L<Dist::Zilla::Role::RegisterStash>
+
+=back
+
+=head1 AUTHOR
+
+Chris Weyl <cweyl@alumni.drew.edu>
+
+=head1 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
+

0 comments on commit 2154c10

Please sign in to comment.